This repository contains a minimal implementation of a single-layer neural network built from scratch using only NumPy. It is designed as a learning tool to understand the core principles of how neural networks work under the hood.
- Single-layer feedforward neural network (no hidden layers)
- Random weight initialization
- Forward propagation using the sigmoid activation function
- Backpropagation using the sigmoid derivative
- Gradient descent for weight optimization
- Binary classification using 2 input features
- Manual training loop over multiple iterations
- No machine learning libraries used (only NumPy)
The model is trained to classify fruit based on weight and color (0-green, 1-yellow) and output a binary classifier (0-lime, 1-lemon)
- Python 3.x
- NumPy
- Understanding of
- Sigmoid Functions
- Derivatives
- Gradients
- Dot Product
MIT License. You are free to use, modify, and share the code.