Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Overview

This project implements an end-to-end Machine Learning pipeline to classify iris flowers into three species — Setosa, Versicolor, and Virginica — using the classic Iris dataset.

The focus of this project is to understand the complete ML workflow — from data preparation and model training to evaluation and deployment — rather than maximizing complexity. The trained model is deployed as an interactive web application using Streamlit.

Objectives

1. Build a clear and reproducible Machine Learning pipeline

2. Train and evaluate a classification model using standard metrics

3. Deploy the trained model using Streamlit

4. Gain hands-on experience with practical ML workflows and deployment

Machine Learning Workflow

Data Loading

  • Load the Iris dataset from a CSV file

  • Remove non-feature columns

  • Separate features and target labels using Pandas

Train–Test Split

  • Split the dataset into training and testing sets

  • Ensure reproducibility using a fixed random state

  • Evaluate model generalization on unseen data

Model Training

Train a Logistic Regression classifier

Logistic Regression was chosen because:

  • The dataset is small and well-structured

  • Features are numeric and largely linearly separable

  • The model is interpretable, stable, and easy to deploy

  • Note:

  • Feature scaling was intentionally not applied in this project.

  • As this is a first ML project, the goal was to explore the simplest complete workflow before introducing additional preprocessing steps such as normalization or standardization.

Optimization using GridSearchCV

Used GridSearchCV to find out the best number of iterations for the model to perform.

  • GridSearchCV was used to tune the model's hyperparameters, specifically to determine the optimal number of iterations.

  • The optimization process allows the model to be more efficient by finding the combination of parameters that lead to better accuracy.

Model Evaluation

  • Accuracy Score

  • Confusion Matrix

  • Classification Report

Deployment

  • The trained Logistic Regression model is saved using pickle

  • A Streamlit web application is used to:

  • Accept user-provided flower measurements

  • Predict the iris species in real time

  • Display class-wise prediction probabilities

Learning Outcomes

  • Through this project, I gained practical experience in:

    Structuring an end-to-end ML pipeline

    Training and evaluating classification models

    Understanding model confidence using prediction probabilities

    Deploying ML models as user-facing applications

  • This project serves as a foundation for exploring more advanced techniques such as feature scaling, hyperparameter tuning, and additional models in future work.

About

End-to-end Iris flower classification project using Logistic Regression, deployed as an interactive Streamlit web app.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages