Skip to content
ML to LLMs
Learning path

Module 4

Classification

Predict classes and calibrated probabilities with logistic regression, then turn scores into decisions with the right metric and threshold.

  1. 1. Logistic regressionTurn a linear score into a probability with the sigmoid, train it with cross-entropy, and extend it to many classes with softmax.35 min
  2. 2. Classification metrics and thresholdsBuild a confusion matrix, compute precision, recall, specificity, and F1, read ROC and PR curves, check calibration, and pick a threshold from the real cost of errors.40 min

Classification models output a score or probability; a threshold turns that score into an action. This module covers the model (logistic regression, sigmoid, softmax, cross-entropy) and then the part that decides real-world impact: confusion matrices, precision and recall, ROC and PR curves, calibration, and class imbalance.

#LessonYou will be able to
1Logistic regressioncompute logits, probabilities, and cross-entropy by hand
2Classification metrics and thresholdsbuild a confusion matrix, compute precision, recall, and F1, and choose a threshold from error costs

Interactive lab: Classification threshold

Next moduleModule 5: Instance-based and probabilistic models