02Chapter 2: Choosing metrics and setting a baselineError analysis starts before you look at a single mistake. You need a metric that reflects what the model is for, and a baseline that tells you whether the score is good. This chapter covers both. It assumes you can train and evaluate a text classifier or tagger, that you know accuracy, precision, r5 min read
03Chapter 3: Reading confusion matrices and per-class metricsAn aggregate score tells you how often the model is wrong. A confusion matrix tells you which classes it mixes up, and that is the first thing you need before you start reading individual errors.6 min read
04Chapter 4: Collecting errors into an inspectable tableThis chapter assumes you can train and evaluate a text classifier, you know accuracy, precision, recall and F1, and you are comfortable with pandas. The previous chapter showed how a confusion matrix tells you which classes the model mixes up. Here you move from counts to the actual examples, so tha6 min read
05Chapter 5: Building an error taxonomy by handAn error taxonomy is a short list of named failure categories, plus counts of how many errors fall into each. This chapter assumes you can train and evaluate a text classifier, read a confusion matrix, and use pandas to filter a DataFrame. The previous chapter produced a table of misclassified examp6 min read
06Chapter 6: Slicing results by text propertiesAn overall score averages over every kind of input. If a model scores 91% accuracy, that number can't show that it scores 98% on short reviews and 70% on long ones. Slicing splits the evaluation set into subgroups defined by a property of the text. It then computes the same metric on each subgroup. 5 min read
07Chapter 7: Telling real slice gaps from noiseThis chapter assumes you can compute per-slice accuracy with pandas, as in the slicing chapter, and that you know what a mean and a standard deviation are. The question here is narrower. Once a slice looks worse than the rest, how do you decide whether it is a real weakness or a chance result on a s5 min read
08Chapter 8: Spotting label noise and ambiguous annotationsSome of the errors you collected in earlier chapters are not model errors. The gold label is wrong, or two reasonable annotators could disagree about it. If you retrain on these examples, you teach the model the wrong thing. If you count them as model failures, you spend effort on problems that don'6 min read
09Chapter 9: Checking confidence and calibrationThis chapter assumes you can train a classifier and read its probability output, and that you know pandas, NumPy, accuracy and the train/validation/test split. Earlier chapters showed how to find errors by reading them. This chapter asks a different question: when the model is wrong, did it know?5 min read
10Chapter 10: Error types in sequence labelingThis chapter assumes you have trained a sequence tagger, such as a named entity recognizer, at least once. It also assumes you know the BIO tagging scheme and the difference between precision, recall and F1. Earlier chapters covered confusion matrices for classifiers. A tagger needs more than that, 5 min read
11Chapter 11: Errors from distribution shiftThis chapter assumes you can compute accuracy, precision, recall and F1, and that you know what train, validation and test splits are. It also assumes basic pandas and scikit-learn. It builds on the earlier chapters on slicing results and building an error taxonomy.5 min read
12Chapter 12: Behavioral tests with input perturbationsThis chapter assumes you can train and evaluate a text classifier, read a confusion matrix, and write basic Python with pandas. Earlier chapters built an error taxonomy from the mistakes your test set happened to contain. Behavioral testing asks a different question: what should the model do on inpu5 min read
13Chapter 13: Using attribution to inspect single errorsThis chapter covers attribution as a tool for forming hypotheses about individual misclassified examples. It assumes you have read the earlier chapters on collecting errors into a table and building an error taxonomy. It also assumes you can train a scikit-learn text classifier and read predicted pr6 min read
14Chapter 14: Ranking error categories and choosing fixesYou now have a list of error categories from your taxonomy. This chapter turns that list into a decision about what to work on next. A category with many errors is not automatically the best target. You also have to weigh how fixable it is, how much it costs to fix, and how sure you are of the count5 min read
15Chapter 15: Closing the loop: fix, re-evaluate, guard against regressionsThis chapter covers the last step of error analysis: turning your ranked error categories into a change, checking whether the change worked, and making sure it stays working. It assumes you can already build an error table, slice results, and compute a bootstrap interval (earlier chapters), and that6 min read