https://github.com/nimanthasupun/neural-network-for-iris-classification
🌸 classify iris flowers into three species (Setosa, Versicolor, Virginica) based on their sepal and petal measurements.
https://github.com/nimanthasupun/neural-network-for-iris-classification
keras neural-network tensorflow
Last synced: 3 months ago
JSON representation
🌸 classify iris flowers into three species (Setosa, Versicolor, Virginica) based on their sepal and petal measurements.
- Host: GitHub
- URL: https://github.com/nimanthasupun/neural-network-for-iris-classification
- Owner: NimanthaSupun
- Created: 2025-05-22T13:09:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-22T13:21:10.000Z (about 1 year ago)
- Last Synced: 2025-05-22T14:45:15.812Z (about 1 year ago)
- Topics: keras, neural-network, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🌸 Feedforward Neural Network for Iris Classification
This project demonstrates how to build, train, and use a **Feedforward Neural Network (FFNN)** using **Keras** to classify **Iris flower species** based on four flower measurements.
It is divided into two main parts:
- `ModelTrain.ipynb`: Model creation, training, and saving
- `ModelPredict.ipynb`: Model loading and prediction on new data
---
## 📁 Project Files
| File | Description |
|---------------------|------------------------------------------------|
| `ModelTrain.ipynb` | export for training the model |
| `ModelPredict.ipynb` | export for using the trained model|
| `FFNN.iris.model.keras` | Saved Keras model (generated after training) |
| `README.md` | Project overview and usage guide |
---
## Model Architecture
- Input layer: 4 features (sepal length, sepal width, petal length, petal width)
- Hidden layers: 16, 40, and 10 neurons with ReLU activation
- Output layer: 3 neurons with softmax activation (for 3 classes)
## Training
- Loss function: categorical_crossentropy
- Optimizer: Adam
- Metrics: Accuracy
- Epochs: 200
- Batch size: 4
- 80/20 train/test split
## 🧠 Problem Statement
Given a dataset with 4 features:
- Sepal length
- Sepal width
- Petal length
- Petal width
...the goal is to classify the input into one of the following species:
- Iris-setosa
- Iris-versicolor
- Iris-virginica
---
## 🧰 Requirements
Make sure Python 3 is installed. Then install dependencies:
```bash
pip install tensorflow keras numpy matplotlib