Update README.md
This commit is contained in:
21
README.md
21
README.md
@ -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]
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user