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 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


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

Uploaded Source

Built Distribution

lpynn-0.0.1.4-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for lpynn-0.0.1.4.tar.gz
Algorithm Hash digest
SHA256 5e2a4ce7203c19c0f17a47952aefd05096497e4cda12f0a8849bae405acd0e3e
MD5 0a59b5d3f77aada90938fc60111f4dc0
BLAKE2b-256 bbe5351e2608a5ff2a6ae7c24f82b282539d9ab8d8251aae5a0bbf77f05e2e72

See more details on using hashes here.

File details

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

File metadata

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

Hashes for lpynn-0.0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3f7be19aee4abef8263b15d5320b05546047ef4d2d4140cfcf753bf654be2390
MD5 65df7efe1954f3bebb0d8633bfd89456
BLAKE2b-256 d04ede7ea43e33bf0f3c57d056ea1878250e73ecb071c1b4c10ea900cb27cc19

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