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

linear vs logistic regression

Regression is a statistical method used to model relationships between dependent and independent variables, with types including linear and logistic regression. Simple linear regression uses a straight line to relate one independent variable to a dependent variable, while multiple linear regression involves multiple independent variables. Logistic regression predicts binary outcomes using the sigmoid function, which maps values to a probability between 0 and 1.

Uploaded by

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

linear vs logistic regression

Regression is a statistical method used to model relationships between dependent and independent variables, with types including linear and logistic regression. Simple linear regression uses a straight line to relate one independent variable to a dependent variable, while multiple linear regression involves multiple independent variables. Logistic regression predicts binary outcomes using the sigmoid function, which maps values to a probability between 0 and 1.

Uploaded by

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

vs

What is Regression?
Regression is a statistical
method used to model the
relationship between a
dependent variable and one or
more independent variables. It
helps us understand how
changes in the independent
variables affect the dependent
variable.
Types of supervised learning:
1. Linear regression
(i) Simple linear regression
(ii) Multiple linear regression
2.Logistic regression
Simple linear regression:
A statistical method used to
model the relationship
between a single independent
variable and a dependent
variable using a straight line.

(independent
)
formula:

y = β₀ + β₁x + ε
where:
● y is the dependent variable
● x is the independent variable
● β₀ is the intercept
● β₁ is the slope
● ε is the error term
Formula for slope:
Pros and Cons:

Pros: Simplicity, Efficiency, Foundation for other models.

Cons: Assumes linearity, Sensitive to outliers, Limited to two variables, May


not capture complex relationships.
Multiple linear regression:
A statistical method used
to model the relationship
between a dependent
variable and multiple
independent variables.
Formula:
y = β₀ + β₁x₁ + β₂x₂ + ... + βₖxₖ + ε

where:
● y is the dependent variable
● x₁, x₂, ..., xₖ are the independent variables
● β₀, β₁, β₂, ..., βₖ are the coefficients

● ε is the error term


Pros and cons:

Pros:Handles multiple independent variables, Foundation for other models.

Cons:Assumes linearity, Sensitive to multicollinearity, Can be computationally


intensive, May not capture nonlinear relationships.
Logistic regression:

A statistical model used to predict


the probability of a binary outcome
(e.g., yes/no, 0/1). The sigmoid
function is a key component of
logistic regression, as it transforms
the linear combination of independent
variables into a probability between 0
and 1.
What is sigmoid function?
Sigmoid function:
A mathematical function that maps any real number to a value between 0 and 1. It
has a characteristic S-shape, which is why it's also known as the S-curve.

Formula:
Why sigmoid function is used in logistic
regression?
1. The sigmoid function maps any real number to a value between 0
and 1. This is ideal for representing probabilities, as probabilities
must fall within this range.
2. While other activation functions like ReLU (Rectified Linear Unit) and
tanh are commonly used in neural networks for different purposes,
they may not be as well-suited for logistic regression. For example,
ReLU's output is not bounded between 0 and 1, making it less
appropriate for modeling probabilities.
Comparison

You might also like