This project is a machine learning application that classifies Iris flowers into their respective species based on sepal and petal measurements. The application uses various classification algorithms and provides a user-friendly web interface for making predictions.
- Interactive web interface for real-time predictions
- Multiple classification algorithms to compare performance:
- Support Vector Machine (SVM)
- Random Forest
- Decision Tree
- Logistic Regression
- Visualization of input parameters
- Easy-to-use sliders for adjusting flower measurements
- Python 3.x
- Streamlit for the web application
- Pandas for data manipulation
- Scikit-learn for machine learning algorithms
- NumPy for numerical operations
The project uses the famous Iris dataset which includes measurements for:
- Sepal Length
- Sepal Width
- Petal Length
- Petal Width
These measurements are used to classify the flowers into one of three species:
- Setosa
- Versicolor
- Virginica
- Clone this repository:
git clone https://github.com/yourusername/iris-classification.git
cd iris-classification
- Create and activate a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
- Install the required packages:
pip install streamlit pandas scikit-learn numpy
- Run the Streamlit application:
streamlit run main.py
Or Run without auto opening tab
streamlit run app.py --server.headless=true
The application will open in your web browser automatically.
Use the sliders on the sidebar to adjust the flower measurements:
- Sepal Length
- Sepal Width
- Petal Length
- Petal Width
Select the classification algorithm you want to use from the dropdown menu.
The application will display the predicted species based on the input measurements.
This project implements four different classification algorithms:
Support Vector Machine (SVM): Effective for high-dimensional spaces and works well with clear margins of separation.
Random Forest: An ensemble method that builds multiple decision trees and merges their predictions, reducing overfitting.
Decision Tree: A simple, interpretable algorithm that makes decisions based on feature values.
Logistic Regression: A statistical model that uses a logistic function to model a binary dependent variable.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.