Skip to content

Machine learning application for classifying Iris flowers based on sepal and petal measurements with an interactive Streamlit web interface.

Notifications You must be signed in to change notification settings

mainmann/Iris-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iris Flower Classification🌸

Overview

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.

Features

  • 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

Technologies Used

  • Python 3.x
  • Streamlit for the web application
  • Pandas for data manipulation
  • Scikit-learn for machine learning algorithms
  • NumPy for numerical operations

Dataset

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

Setup Instructions

  1. Clone this repository:
git clone https://github.com/yourusername/iris-classification.git
cd iris-classification
  1. Create and activate a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate  # On Windows, use: venv\Scripts\activate
  1. Install the required packages:
pip install streamlit pandas scikit-learn numpy

Usage Guide

  1. Run the Streamlit application:
streamlit run main.py

Or Run without auto opening tab

streamlit run app.py --server.headless=true
  1. The application will open in your web browser automatically.

  2. Use the sliders on the sidebar to adjust the flower measurements:

  • Sepal Length
  • Sepal Width
  • Petal Length
  • Petal Width
  1. Select the classification algorithm you want to use from the dropdown menu.

  2. The application will display the predicted species based on the input measurements.

Model Information

This project implements four different classification algorithms:

  1. Support Vector Machine (SVM): Effective for high-dimensional spaces and works well with clear margins of separation.

  2. Random Forest: An ensemble method that builds multiple decision trees and merges their predictions, reducing overfitting.

  3. Decision Tree: A simple, interpretable algorithm that makes decisions based on feature values.

  4. Logistic Regression: A statistical model that uses a logistic function to model a binary dependent variable.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Machine learning application for classifying Iris flowers based on sepal and petal measurements with an interactive Streamlit web interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages