Logistic Regression
Logistic Regression
Regression
Regression analysis is a statistical
method to model the relationship
What is between the dependent and
independent variables.
Regression
Regression estimates the relationship
between the target and the independent
variable
Regression 2
Cost function
A function that is defined on an
entire data instance is called the
Cost function
y = a_0 + a_1 * x
Gradient Descent
3
Briefly elaborate on what you
want to discuss.
• A cost function is a measure of how wrong the
model is in terms of its ability to estimate the
relationship between dependent and
independent variables
• Gradient descent enables a model to learn the gradient or direction that the model
should take in order to reduce errors.
• Direction in the simple linear regression example refers to how the model parameters
a_0 and a_1 should be corrected to further reduce the cost function.
• As the model iterates, it gradually converges towards a minimum which is also called as
convergence.
Gradient Descent
Effect of learning rate in gradient descent
3D plot
What is
Logistic
Regression
Logistic regression is a supervised learning classification
No
Target variable Variables Sample size
multi-collinearity
The target variable must We must add meaningful Choose a large sample
The independent
always be binary variables in our model size for logistic
variables must be
regression
independent of each
other
1 2
The Dependent variable will The dependent variable The dependent variable
have only two possible can have 3 or more can have 3 or more
types either 1 and 0 possible unordered possible ordered types
types
• The activation function used in the Logistic
regression is sigmoid function.
function
another value between 0 and 1.
In Logistic
Regression
σ(Z) = σ(β₀ + β₁X)
Cost function in Logistic
Regression
Gradient Descent
Decision Boundary
Implementation of Logistic Regression
Hyperparameter
Tuning
Applications of Logistic Regression