Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🌸 Iris Flower Classification using Neural Networks

A multi-class classification project that classifies Iris flowers into three species (Iris-setosa, Iris-versicolor, and Iris-virginica) using a Sequential Neural Network built with Keras and TensorFlow, and evaluated using 10-Fold Cross-Validation via Scikit-Learn.


📋 Overview

The goal of this project is to accurately predict the species of an unseen Iris plant based on four morphological measurements[cite: 1]. The workflow covers data loading, exploratory data visualization, target label one-hot encoding, neural network modeling, and rigorous cross-validation evaluation[cite: 1].


📊 Dataset Information

The dataset contains 150 instances (50 instances per class across 3 classes)[cite: 1]:

  • Features (Inputs):[cite: 1]
    1. Sepal length (cm)[cite: 1]
    2. Sepal width (cm)[cite: 1]
    3. Petal length (cm)[cite: 1]
    4. Petal width (cm)[cite: 1]
  • Target Classes (Outputs):[cite: 1]
    • Iris-setosa[cite: 1]
    • Iris-versicolor[cite: 1]
    • Iris-virginica[cite: 1]

🛠️ Tech Stack & Libraries

  • Python 3[cite: 1]
  • Pandas & NumPy – Data loading, manipulation, and array operations[cite: 1]
  • Matplotlib – Scatter plots for Sepal and Petal feature visualization[cite: 1]
  • Keras & TensorFlow – Building and training the artificial neural network[cite: 1]
  • Scikit-Learn – LabelEncoder, KerasClassifier wrapper, and KFold cross-validation[cite: 1]

🧠 Model Architecture & Training

A baseline feedforward neural network is constructed using Keras Sequential API[cite: 1]:

Layer Type Neurons Activation Input Shape
Hidden Layer Dense (Fully Connected)[cite: 1] 8[cite: 1] relu[cite: 1] (4,)[cite: 1]
Output Layer Dense (Fully Connected)[cite: 1] 3[cite: 1] softmax[cite: 1] (8,)
  • Loss Function: categorical_crossentropy[cite: 1]
  • Optimizer: adam[cite: 1]
  • Training Parameters: 200 epochs, batch size of 5[cite: 1]

📈 Evaluation & Results

To ensure model generalizability and prevent overfitting, the network is wrapped with KerasClassifier and evaluated using 10-Fold Cross-Validation (random_state=7)[cite: 1]:

  • Baseline Prediction Accuracy: 97.33% (± 4.42%)[cite: 1]
  • Individual Fold Accuracies: [100%, 93.33%, 100%, 100%, 100%, 100%, 100%, 93.33%, 100%, 86.67%][cite: 1]

🚀 How to Run

  1. Clone the repository:
    git clone [https://github.com/Raja-M-4664/](https://github.com/Raja-M-4664/)<repository-name>.git
    cd <repository-name>
    

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages