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.
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
- Name: Iris Flower Dataset
- Source: Kaggle - UCI Iris Dataset
- File Used:
Iris.csv - Features:
SepalLengthCmSepalWidthCmPetalLengthCmPetalWidthCmSpecies(Target)
| 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 |
- 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
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# Create virtual environment
python -m venv venv
# Activate on PowerShell
.\venv\Scripts\Activate.ps1
# Or on CMD
venv\Scripts\activate.batpip install -r requirements.txt- Download from Kaggle Dataset Page
- Place
Iris.csvin the root project directory
Your folder should look like:
iris-classifier/
├── app.py
├── Iris.csv
├── requirements.txt
└── README.md
streamlit run app.pyThen visit http://localhost:8501 in your browser.
streamlit
pandas
numpy
matplotlib
seaborn
scikit-learn
-
Algorithm Used: Logistic Regression
-
Train/Test Split: 80/20
-
Evaluation: Accuracy Score, Confusion Matrix
-
Input Features:
- Sepal Length
- Sepal Width
- Petal Length
- Petal Width
Rohan Hake Final Year IT Student | Python & Web Developer 📧 LinkedIn
This project is licensed under the MIT License - feel free to use and modify.
