02Chapter 2: The confusion matrix: TP, FP, TN, FNThis chapter assumes you know basic Python, understand supervised binary classification with labeled data, and know what a train/test split is. You will build a confusion matrix by hand, read each cell, and check your counts against scikit-learn. Later chapters turn these counts into accuracy, preci3 min read
03Chapter 3: Accuracy: the share of correct predictionsThis chapter assumes you can read basic Python, know what a labeled binary classification task is, and have met the confusion matrix (TP, FP, TN, FN) in the previous chapter. You will compute accuracy from those four counts and learn what it does and does not tell you.3 min read
04Chapter 4: When accuracy misleads: imbalanced classesThis chapter assumes you can read basic Python, know what a labeled binary classification problem is, and have seen a confusion matrix with TP, FP, TN, and FN counts. Accuracy is the share of predictions that are correct, which is (TP + TN) divided by all predictions. It is easy to compute, and on s3 min read
05Chapter 5: Precision: how trustworthy are positive predictionsThis chapter assumes you can read a confusion matrix (TP, FP, TN, FN), you know what a supervised binary classifier is, and you can write basic Python. Here you will learn what precision measures, how to compute it, and which mistakes people commonly make with it.3 min read
06Chapter 6: Recall: how many real positives were foundThis chapter assumes you know basic Python, supervised classification with labeled data, train and test splits, and the confusion matrix counts TP, FP, TN, and FN from the earlier chapters.3 min read
07Chapter 7: Choosing a metric by the cost of errorsThis chapter assumes you can build a confusion matrix and compute accuracy, precision, and recall from its counts. It also assumes basic Python and a working idea of supervised classification. Here you will learn how to pick the metric that matches what a mistake costs in your application.3 min read
08Chapter 8: F1 score: combining precision and recallThis chapter assumes you can already compute precision and recall from confusion matrix counts (TP, FP, FN) and write basic Python. It shows how to merge the two into one number, and where that number can mislead you.3 min read
09Chapter 9: Moving the threshold: precision versus recallThis chapter assumes you can read a confusion matrix and compute precision and recall from TP, FP, and FN counts. It also assumes basic Python and the idea of a classifier that outputs a score.3 min read
10Chapter 10: Computing the metrics with scikit-learnThis chapter assumes you know basic Python, what a labeled binary classification problem is, and how the confusion matrix, accuracy, precision, recall, and F1 are defined. Earlier chapters computed these by hand. Here you will get the same numbers from scikit-learn and use the manual counts to check3 min read
11Chapter 11: Multiclass problems: macro, micro, and weighted averagesThis chapter assumes you can read a binary confusion matrix and compute precision, recall, and F1 from TP, FP, and FN. It also assumes you have used scikit-learn's metric functions. Here you extend those metrics to three or more classes.3 min read
12Chapter 12: Common pitfalls when reporting metricsThis chapter assumes you can compute a confusion matrix, accuracy, precision, recall, and F1, and that you know what a train/test split is. It covers mistakes that make a correct formula produce a misleading number.3 min read