From 62221a5b56c20ed1bc2a16b945d63a76511dcca0 Mon Sep 17 00:00:00 2001 From: Justine Date: Sun, 1 Mar 2026 20:07:31 +0100 Subject: [PATCH] Update README.md --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index e69de29..e600abb 100644 --- a/README.md +++ b/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] +```