From-stratch implementation of the perceptron, the simplest neural network, in Python. Linked article
Clone the repository. Then,
cd perceptron
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtpython main.pyThe script generates a dataset, trains the perceptron and prints the resulting accuracy.
For example :
precision recall f1-score support
0.0 0.93 1.00 0.97 43
1.0 1.00 0.91 0.95 32
accuracy 0.96 75
macro avg 0.97 0.95 0.96 75
weighted avg 0.96 0.96 0.96 75