0% found this document useful (0 votes)
10 views

AI Model for Iris Species Prediction Using Logistic Regression Algorithm-1

Uploaded by

Zabii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

AI Model for Iris Species Prediction Using Logistic Regression Algorithm-1

Uploaded by

Zabii
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Tab 1

University of Agriculture Sub Campus Depalpur Okara

Teacher Name: Sir Faheem Tariq

Subject: CS-505(Machine Learning)

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

AI Model for Iris Species Prediction Using Logistic Regression Algorithm

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:

● 150 samples divided equally among three species:


○ Setosa
○ Versicolor
○ Virginica
● Features:
○ Sepal Length
○ Sepal Width
○ Petal Length
○ Petal Width

This dataset is included in the Seaborn library for convenient loading and visualization.

3. Flow Diagram

The following diagram represents the flow of the project:

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

The architecture of the project is modular, focusing on simplicity and usability:

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

● The application is designed for local and cloud deployment:


○ Local: Run directly using Streamlit (streamlit run app.py).
○ Cloud: Deploy on platforms like Heroku, AWS, or GCP.

Features Explained

1. User Input

● Users can adjust the values for:


○ Sepal Length: Range [4.3, 7.9 cm]
○ Sepal Width: Range [2.0, 4.4 cm]
○ Petal Length: Range [1.0, 6.9 cm]
○ Petal Width: Range [0.1, 2.5 cm]

2. Preprocessing

● Features are normalized to improve model performance.


● Species labels are encoded into numeric values for compatibility with the Logistic
Regression model.

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.

You might also like