Logistic_Regression_Class_Notes
Logistic_Regression_Class_Notes
Introduction
Logistic regression is a statistical method used for binary classification problems. It predicts
the probability that a given input belongs to one of two classes.
Key Concepts
1. Linear Model Foundation:
- Logistic regression models the relationship between input variables (features) and the
output (label) using a logistic function.
- It assumes a linear relationship between the independent variables and the log-odds of the
dependent variable.
2. Sigmoid Function:
σ(z) = 1 / (1 + e^(-z))
- z = w^T x + b, where w represents weights, x input features, and b the bias term.
Mathematical Formulation
1. Log-Odds:
log-odds = log(P(y=1)/P(y=0))
2. Cost Function:
- y: actual label
3. Gradient Descent:
θ = θ - α ∇J(θ)
- α: learning rate
Evaluation Metrics
1. Accuracy: Fraction of correct predictions.
4. ROC Curve and AUC: Measures the model's performance across all classification
thresholds.
Applications
1. Medical diagnosis (e.g., disease prediction).
2. Fraud detection.
Advantages
1. Simple to implement and interpret.
2. Computationally efficient.
Extensions
1. Multinomial Logistic Regression: For multi-class classification.
Conclusion
Logistic regression remains a foundational and widely-used tool for binary classification
tasks due to its simplicity and interpretability.