Skip to content

Instantly share code, notes, and snippets.

View amaynez's full-sized avatar
:electron:

amaynez amaynez

:electron:
View GitHub Profile
@amaynez
amaynez / main.py
Created February 5, 2021 21:36
Perceptron
"""
This program creates a single neuron neural network tuned to guess
if a point is above or below a randomly generated line.
The neuron is called Perceptron and has 3 inputs and weights to calculate its output
input 1 is the X coordinate of the point
Input 2 is the y coordinate of the point
Input 3 is the bias and it is always 1
Input 3 or the bias is required for lines that do not cross the origin (0,0)