This project is a machine learning web application built with Streamlit that classifies Iris flowers using five different algorithms:
- Logistic Regression
- K-Nearest Neighbors (KNN)
- Support Vector Machine (SVM)
- Decision Tree
- Random Forest
The app visualizes Precision-Recall Curves to evaluate the models' performance and helps users interactively explore how different classifiers perform on the Iris dataset.
- 🧠 Train and test five popular ML models on the Iris dataset.
- 📈 Visual comparison of performance using Precision-Recall Curves.
- 🔍 Interactive UI with options to choose model and visualize results.
-
Clone the repository:
bash
CopyEdit
git clone https://github.com/your-username/iris-classification-app.git cd iris-classification-app -
Create a virtual environment (optional but recommended):
bash
CopyEdit
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` -
Install dependencies:
bash
CopyEdit
pip install -r requirements.txt -
Run the app:
bash
CopyEdit
streamlit run app.py
We use Precision-Recall Curves to evaluate model performance, especially useful for imbalanced datasets. The app displays:
- Precision
- Recall
- PR Curve (one-vs-rest for multi-class)
- Source: UCI Machine Learning Repository
- Classes: Setosa, Versicolor, Virginica
- Features: Sepal length/width, Petal length/width
scikit-learnmatplotlibpandasnumpyjoblibstreamlit
You can find all dependencies in the requirements.txt.
To deploy the app using Streamlit Cloud:
- Push the code to a GitHub repo.
- Go to Streamlit Cloud, sign in with GitHub, and select the repo.
- Set the main file path to
1_classification.py. - Click Deploy.
Contributions are welcome! Feel free to fork the repo, open issues, or submit PRs.
- Author: Apoorv Tripathi
- Email: apoorvtripathi537@gmail.com
- LinkedIn: @apoorv