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

B55MLExp1

The document outlines an experiment aimed at implementing Logistic Regression, a supervised learning algorithm used for binary classification. It discusses the theory behind logistic regression, its applications in various fields, and its advantages such as interpretability and low computational resource requirements. The document also includes sections for students to record their observations, software code, and conclusions regarding their learning outcomes.
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)
5 views

B55MLExp1

The document outlines an experiment aimed at implementing Logistic Regression, a supervised learning algorithm used for binary classification. It discusses the theory behind logistic regression, its applications in various fields, and its advantages such as interpretability and low computational resource requirements. The document also includes sections for students to record their observations, software code, and conclusions regarding their learning outcomes.
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/ 4

PART A

(PART A: TO BE REFFERED BY STUDENTS)

Experiment No. 1
A.1 Aim:

To implement Logistic Regression.

A.2 Prerequisite:
Python Basic Concepts

A.3 Outcome:
Students will be able to implement Logistic Regression.

A.4 Theory:

Machine Learning, being a subset of Artificial Intelligence (AI), has been playing a dominant
role in our daily lives. Data science engineers and developers working in various domains
are widely using machine learning algorithms to make their tasks simpler and life easier.

Types of supervised learning


As supervised learning is used to classify something or predict a value, naturally there are two
types of algorithms for supervised learning - classification models and regression models.

1. Classification model - In simple terms, a classification model predicts possible


outcomes. Example: Predicting if a transaction is fraud or not.
2. Regression model - Are used to predict a numerical value. Example: Predicting the
sale price of a house.

Logistic regression

Logistic regression is an example of supervised learning. It is used to calculate or predict the


probability of a binary (yes/no) event occurring. An example of logistic regression could be
applying machine learning to determine if a person is likely to be infected with COVID-19 or
not. Since we have two possible outcomes to this question - yes they are infected, or no they
are not infected - this is called binary classification.

Sigmoid function, which produces an S-shaped curve. It always returns a probability value
between 0 and 1. The Sigmoid function is used to convert expected values to probabilities.
The function converts any real number into a number between 0 and 1. We utilize sigmoid to
translate predictions to probabilities in machine learning.The mathematically sigmoid
function can be

Where to use logistic regression

● In health care, logistic regression can be used to predict if a tumor is likely to be benign
or malignant.
● In the financial industry, logistic regression can be used to predict if a transaction is
fraudulent or not.
● In marketing, logistic regression can be used to predict if a targeted audience will respond
or not.

Advantages of the Logistic Regression Algorithm

● Logistic regression performs better when the data is linearly separable

● It does not require too many computational resources as it’s highly interpretable

● There is no problem scaling the input features—It does not require tuning

● It is easy to implement and train a model using logistic regression

● It gives a measure of how relevant a predictor (coefficient size) is, and its direction of
association (positive or negative)

PART B
(PART B : TO BE COMPLETED BY STUDENTS)

(Students must submit the soft copy as per following segments within two hours of the practical. The
soft copy must be uploaded on the Blackboard or emailed to the concerned lab in charge faculties at
the end of the practical in case the there is no Black board access available)

Roll. No. BE-55 Name:Avinash Balu Shinde


Class: BE-Comps Batch: B3
Date of Experiment: 11-07-2024 Date of Submission: 31-07-2024
Grade:

B.1 Software Code written by student:


(Paste your Search material completed during the 2 hours of practical in the lab here)

B.2 Input and Output:


(Not Required)

B.3 Observations and learning:


(Students are expected to comment on the output obtained with clear observations and learning for each task/
sub part assigned)

Logistic regression aims to solve classification problems. It does this by predicting categorical
outcomes. Logistic regression is a statistical method used for binary classification, predicting the
probability of a binary outcome based on predictor variables. It employs the logistic function to
transform predictions into probabilities between 0 and 1. Coefficients in logistic regression indicate
the change in log-odds of the outcome for a unit change in the predictor, considering other variables
in the model. Training involves maximizing the likelihood of observed data given the model
parameters. Evaluation metrics like accuracy and ROC curves assess model performance.
Assumptions include linearity between predictors and log-odds, independent errors, and minimal multi
co-linearity. Logistic regression is widely applied in fields such as healthcare, marketing, and finance
for tasks like disease prediction, customer behavior analysis, and risk assessment, owing to its
interpretability and effectiveness in predicting binary outcomes based on available data.

B.4 Conclusion:
(Students must write the conclusion as per the attainment of individual outcome listed above and
learning/observation noted in section B.3)
Logistic regression is a valuable method for predicting binary outcomes by modeling probabilities
using the logistic function. It offers interpretable results through coefficients that quantify the impact
of predictors on the outcome's likelihood. Despite its assumptions, such as linearity and independence
of errors, logistic regression finds widespread use in fields like healthcare, marketing, and finance for
tasks such as disease prediction, customer segmentation, and risk assessment. Its simplicity and
effectiveness, as measured by metrics like accuracy and ROC curves, underscore its importance in
making informed decisions based on categorical data.

You might also like