This project demonstrates machine learning classification using the classic Iris dataset. The model predicts iris flower species based on sepal and petal measurements and provides an interactive Streamlit dashboard for live predictions and model performance visualization.
-
Input sepal length, sepal width, petal length, and petal width using interactive sliders.
-
Instantly predict the iris species:
- Setosa
- Versicolor
- Virginica
- Accuracy Score visualization
- Confusion Matrix for classification analysis
- Feature Importance analysis using permutation importance
- Random Forest Classifier trained on the Iris dataset
- Model saved as a
.pklfile for fast loading - Label Encoder saved for consistent predictions
- Python 3.x
- Scikit-learn
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Streamlit
- Pickle
iris/
│
├── iris_app.py
├── iris_cleaned.csv
├── iris_model.pkl
├── label_encoder.pkl
├── Iris_Classification.ipynb
├── requirements.txt
└── README.md
- Cleaned and prepared the Iris dataset
- Standardized column names
- Encoded species labels for model training
- Trained a Random Forest Classifier
- Evaluated model accuracy
- Generated confusion matrix
- Saved model and encoder using Pickle
- Loads trained model and label encoder
- Accepts user input through sliders
- Displays live predictions
- Visualizes model performance metrics
- Successfully classified Iris flower species using machine learning.
- Achieved high prediction accuracy using Random Forest Classification.
- Built an interactive Streamlit dashboard for real-time predictions.
- Visualized model performance using confusion matrices and feature importance plots.
Clone the repository:
git clone https://github.com/swethasuresh1905/iris_classification.gitInstall dependencies:
pip install -r requirements.txtRun the Streamlit application:
streamlit run iris_app.py- Compare multiple classification algorithms
- Deploy dashboard online
- Add advanced visualizations
- Enable batch predictions using CSV uploads
Swetha Suresh
B.Tech Artificial Intelligence & Data Science