Professional Documents
Culture Documents
Classification
Logistic Regression
• An statistical approach that determine a Binary
outcome based on one or more independent
variables.
• Binary outcome:
» 1/0,
» Yes/No,
» True/False etc.
Sigmoid Function (Logistic
Function)
g
Logistic Regression: Model Representation
Where, z= θTx
Interpretation of Hypothesis
output
Hypothesis:
hθ(x) = “estimated probability that y= 1 on input x” = g(θTx)
P(y=0|x; θ) = 1- P(y=1|x; θ)
Decision Boundary
Logistic Regression
Suppose,
predict “y=1” if hθ(x) >= 0.5
predict “y= 0” if hθ(x) < 0.5
Example: Two Feature x1 and x2
Example: Two Feature x1 and x2
Let
In Logistic Regression
Cost function for
Logistic Regression
y=1
y=2
y=3
Bias vs Variance: Overfitting Problem
Bias vs Variance: Overfitting Problem
Bias vs Variance: Overfitting Problem
Bias vs Variance: Overfitting Problem
Addressing Overfitting
Options:
1. Reduce number of features
- Manually select which features to keep.
- Feature selection algorithm
(Feature Reduction approach like PCA etc.)