This project implements a simple neural network from scratch using NumPy to classify flowers based on two inputs (theirs width and length).
- A basic feedforward neural network with one hidden layer.
- Uses sigmoid activation and backpropagation for training.
- Predicts the color of a flower (Red or Blue) based on 2 input values.
- The datas of this project are totally fictive
- Python 3.x
- NumPy
Clone the repository and run the script It will train the neural network and make a prediction based on a test input.
-
Data Preprocessing:
- Normalizes the input data.
- Splits it into training data and a separate test input.
-
Neural Network Structure:
- Input layer: 2 neurons
- Hidden layer: 3 neurons
- Output layer: 1 neuron (predicting 0 or 1)
-
Training:
- Uses backpropagation with gradient descent for weight updates.
- Runs for 1,000,000 iterations to minimize error.
-
Prediction:
- After training, the network predicts the color of a flower based on new input data.
- The flower is blue if y=0 or red if y=1
Inspired by this YouTube tutorial: Link.
How can we classify the flowers if we have a third color (green for exemple)
Camille ANSEL