Not every prediction is a number. This module shifts from predicting how much to predicting which category, starting with logistic regression β why linear regression breaks down for categorical outcomes, and how the logistic function fixes it. The evaluation chapter then confronts the most common trap in classification: a model can be 97% accurate and still be useless. You will learn to read a confusion matrix, choose metrics that match the cost of each kind of error, and use ROC curves to judge how well a model ranks risk.
Learning Objectives
By the end of this module, you will:
- Explain why linear regression fails for classification and how logistic regression solves it
- Interpret logistic regression coefficients in terms of log-odds, odds, and business impact
- Build and compare logistic regression models with scikit-learnβs
LogisticRegression
- Make probability-based predictions and reason about the classification threshold
- Recognize the accuracy trap and explain why accuracy misleads on imbalanced data
- Construct and interpret confusion matrices, precision, recall, and F1-score
- Use ROC curves and AUC to evaluate ranking quality
- Select evaluation metrics based on the real-world cost of false positives and false negatives