Skip to main content

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


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.2.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

lpynn-0.0.2.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file lpynn-0.0.2.1.tar.gz.

File metadata

  • Download URL: lpynn-0.0.2.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for lpynn-0.0.2.1.tar.gz
Algorithm Hash digest
SHA256 bc5390264b604b059ff052957bca22f5a595c52035cac6c53dd32b2b2181972b
MD5 80dea6eef5697d29279b423790fcd18f
BLAKE2b-256 d9bd4459bc06e9195ccf5e4b54be36365334182ba7597ed3400846699b7e1e1a

See more details on using hashes here.

File details

Details for the file lpynn-0.0.2.1-py3-none-any.whl.

File metadata

  • Download URL: lpynn-0.0.2.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

Hashes for lpynn-0.0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1fa467c22d79226e4fc9869d3393461595cb3fa7f9bca83c18b32e885c22764f
MD5 db5060d6dd319b137be08b63b0db5cd7
BLAKE2b-256 0fbe9c7caabcb623d5a296b84aeb2fcc8d7bd13ed6ff739753613871e135e0b9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page