Update README.md

This commit is contained in:
Justine
2026-03-01 20:07:31 +01:00
parent c9351ca3c6
commit 62221a5b56

View File

@ -0,0 +1,21 @@
# Perceptron
This is a simple perceptron, with data to train it on. It is from [this article](https://sharpsight.ai/blog/python-perceptron-from-scratch/). 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]
```