A basic neural networks python package
Project description
lpynn
This is a basic neural network package consisting of a single perceptron node. It can do binary classification.
Usage
Example:
from lpynn.perceptron import init_perceptron, print_perceptron, normalize_input_vectors, Perceptron, train_dataset
from lptypes import i32, f64
def main0():
p: Perceptron = Perceptron(0, [0.0], 0.0, 0, 0.0, 0.0, 0)
init_perceptron(p, 2, 0.05, 10000, 90.0)
print_perceptron(p)
print("=================================")
input_vectors: list[list[f64]] = [[-1.0, -1.0], [-1.0, 1.0], [1.0, -1.0], [1.0, 1.0]]
outputs: list[i32] = [1, 1, 1, -1]
normalize_input_vectors(input_vectors)
train_dataset(p, input_vectors, outputs)
print_perceptron(p)
main0()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lpynn-0.0.1.tar.gz
(4.0 kB
view details)
Built Distribution
lpynn-0.0.1-py3-none-any.whl
(4.0 kB
view details)
File details
Details for the file lpynn-0.0.1.tar.gz
.
File metadata
- Download URL: lpynn-0.0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f9d3975aa7ecedf54cebc09b7d16e2b704529713bb43dc28889d1980c7f8af5 |
|
MD5 | 9a2558e5d955e04a9ca5733fc6d75493 |
|
BLAKE2b-256 | d280c90945431706624ea54ddb91bb495d357c7db58f3a68e9665212d46bc667 |
File details
Details for the file lpynn-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: lpynn-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb46d45431b6908592afb603418a0167657a6b4ab25c7ba6028fb84137a62ef4 |
|
MD5 | f5375d4583a520c9a5537b7ed70f6ee6 |
|
BLAKE2b-256 | 8ea961eefd437f2d6cc66d6fc5e39bf1cf8bf5c2d7eeda91ecf1ae201de2e431 |