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 lpython 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.3.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file lpynn-0.0.1.3.tar.gz
.
File metadata
- Download URL: lpynn-0.0.1.3.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a81a01040fc637073c2b4b3d8cd43b0566cfd4660edec12107db35d44bdfeb9b |
|
MD5 | 99017726e0209135fe239b4414d69baa |
|
BLAKE2b-256 | 879b99a63c6fcee14dc4d33ceeb6a30241e9c854ade5bef10576ddc6246a58a1 |
File details
Details for the file lpynn-0.0.1.3-py3-none-any.whl
.
File metadata
- Download URL: lpynn-0.0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.8 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 | aba359d1b653755f53df3b7ac69d3a9f7f5b4ff2e48dfa034d24dbf71c36e56d |
|
MD5 | 014b9c312a7b6fa5b912268223387e22 |
|
BLAKE2b-256 | 8fc728ee468d94f4dcb02952efade9b36714e839d83a5076c81dc1ece1b9e88f |