AI Model for Iris Species Prediction Using Logistic Regression Algorithm-1
AI Model for Iris Species Prediction Using Logistic Regression Algorithm-1
Assignment Topic: AI Model for Iris Species Prediction Using Logistic Regression
Algorithm
Group Members
Student Name: Muhammad Zohaib.(2022-ag-9236)
Student Name: Muhammad Bilal.(2022-ag-9263)
Student Name: Umair Yousaf.(2022-ag-9216)
1. Project Title
2. Objective
The primary aim of this project is to build an interactive AI application capable of predicting
the species of an Iris flower. The prediction is based on its physical attributes:
sepal_length, sepal_width, petal_length, and petal_width.
Dataset
We use the popular Iris dataset, a benchmark dataset in machine learning. It includes:
This dataset is included in the Seaborn library for convenient loading and visualization.
3. Flow Diagram
4. Short Summary
This project provides an interactive, real-time AI model for predicting Iris flower species
using Logistic Regression. It leverages a simple, user-friendly Streamlit dashboard with
the following features:
● Parameter Inputs: Users can provide input for sepal and petal dimensions using
sliders.
● Model Prediction: Displays the predicted species along with the probabilities for
each species.
● Dataset Insights: Provides a preview of the Iris dataset for reference.
The app combines data preprocessing, model training, and a live prediction pipeline. It
is a compact example of supervised learning with a focus on making machine learning
accessible and interactive for end-users.
5. Architecture
Frontend
● Streamlit Framework:
○ Sidebar for user input (sliders for feature values).
○ Display area for:
■ Predicted species
■ Prediction probabilities
■ Dataset preview.
Backend
1. Data Handling:
○ Load the dataset using the Seaborn library.
○ Use pandas to process the dataset and split it into features (X) and labels (y).
2. Model Training:
○ Use Logistic Regression from scikit-learn.
○ Train the model using the full Iris dataset (for simplicity).
3. Prediction Pipeline:
○ Convert user input into a suitable format.
○ Perform predictions and calculate probabilities using the trained Logistic
Regression model.
Deployment
Features Explained
1. User Input
2. Preprocessing
3. Prediction
● The trained Logistic Regression model predicts the species (Setosa, Versicolor,
Virginica).
● Prediction probabilities are shown for each species, helping users understand the
confidence of the model.
4. Interactive UI
● Live Interaction: Users get real-time predictions as they adjust the sliders.
● Clear Visuals: Displayed results include both the predicted class and the associated
probabilities.