An open API service indexing awesome lists of open source software.

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.

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