Skip to content

rohanhake98/Iris-Flower-Classifier-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

🌸 Iris Flower Classifier & Visualizer

An interactive machine learning and data visualization web app using Streamlit, Scikit-learn, Pandas, and Seaborn. This project classifies Iris flower species and visualizes their feature relationships.


📌 Project Overview

This project is based on the classic Iris flower dataset. It:

  • Trains a Logistic Regression model on iris features.
  • Shows model accuracy and a confusion matrix.
  • Allows real-time prediction of species based on input.
  • Offers interactive visualizations such as:
    • Pairplot
    • Violinplot
    • Distribution charts

📂 Dataset

  • Name: Iris Flower Dataset
  • Source: Kaggle - UCI Iris Dataset
  • File Used: Iris.csv
  • Features:
    • SepalLengthCm
    • SepalWidthCm
    • PetalLengthCm
    • PetalWidthCm
    • Species (Target)

🧠 Tools & Libraries Used

Tool Purpose
Python Core programming language
Streamlit Web framework for interactive UI
Pandas Data loading and manipulation
Seaborn/Matplotlib Visualizations
Scikit-learn ML model (Logistic Regression), metrics

⚙️ Project Features

  • Load and display the raw dataset
  • Visualize feature relationships
  • Train and evaluate Logistic Regression model
  • Show model accuracy and confusion matrix
  • Predict flower species based on user input

🚀 How to Run the Project Locally

✅ 1. Clone the Repository

git clone https://github.com/your-username/iris-classifier.git
cd iris-classifier


# 🌸 Iris Flower Classifier & Visualizer

An interactive machine learning and data visualization web app using **Streamlit**, **Scikit-learn**, **Pandas**, and **Seaborn**. This project classifies Iris flower species and visualizes their feature relationships.

---

## 📌 Project Overview

This project is based on the classic **Iris flower dataset**. It:

* Trains a **Logistic Regression** model on iris features.
* Shows model accuracy and a **confusion matrix**.
* Allows real-time prediction of species based on input.
* Offers **interactive visualizations** such as:

  * Pairplot
  * Violinplot
  * Distribution charts

---

## 📂 Dataset

* **Name:** Iris Flower Dataset
* **Source:** [Kaggle - UCI Iris Dataset](https://www.kaggle.com/datasets/uciml/iris)
* **File Used:** `Iris.csv`
* **Features:**

  * `SepalLengthCm`
  * `SepalWidthCm`
  * `PetalLengthCm`
  * `PetalWidthCm`
  * `Species` (Target)

---

## 🧠 Tools & Libraries Used

| Tool               | Purpose                                 |
| ------------------ | --------------------------------------- |
| Python             | Core programming language               |
| Streamlit          | Web framework for interactive UI        |
| Pandas             | Data loading and manipulation           |
| Seaborn/Matplotlib | Visualizations                          |
| Scikit-learn       | ML model (Logistic Regression), metrics |

---

## ⚙️ Project Features

* Load and display the raw dataset
* Visualize feature relationships
* Train and evaluate Logistic Regression model
* Show model accuracy and confusion matrix
* Predict flower species based on user input

---

## 🚀 How to Run the Project Locally

### ✅ 1. Clone the Repository

```bash
git clone https://github.com/your-username/iris-classifier.git
cd iris-classifier

✅ 2. Create & Activate Virtual Environment

# Create virtual environment
python -m venv venv

# Activate on PowerShell
.\venv\Scripts\Activate.ps1

# Or on CMD
venv\Scripts\activate.bat

✅ 3. Install Dependencies

pip install -r requirements.txt

✅ 4. Download Dataset

Your folder should look like:

iris-classifier/
├── app.py
├── Iris.csv
├── requirements.txt
└── README.md

✅ 5. Run the Streamlit App

streamlit run app.py

Then visit http://localhost:8501 in your browser.


🧾 Sample requirements.txt

streamlit
pandas
numpy
matplotlib
seaborn
scikit-learn

🗈️ Screenshot (Optional)

App Screenshot


📈 Model Info

  • Algorithm Used: Logistic Regression

  • Train/Test Split: 80/20

  • Evaluation: Accuracy Score, Confusion Matrix

  • Input Features:

    • Sepal Length
    • Sepal Width
    • Petal Length
    • Petal Width

👨‍💻 Author

Rohan Hake Final Year IT Student | Python & Web Developer 📧 LinkedIn


📄 License

This project is licensed under the MIT License - feel free to use and modify.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages