Files
Perceptron/README.md
2026-03-01 20:07:31 +01:00

620 B

Perceptron

This is a simple perceptron, with data to train it on. It is from this article. I copied the code for the perceptron class from the article and added the comments, as I read the article, to understand how it works.

I also added the part where we use to see if 2 numbers are > 2 when added. It works !

Model initialized, starting to train with 1000 iterations on 10 data samples
Features (x) : [[0 0]
 [0 1]
 [1 0]
 [1 1]
 [2 2]
 [2 0]
 [0 2]
 [3 1]
 [1 3]
 [3 3]]
Truths (y): [0 0 0 0 1 0 0 1 1 1]
Predictions : [0 0 0 0 1 0 0 1 1 1]