Chapter 15: Evaluating Classifiers

Build classifiers with scikit-learn, evaluate them beyond accuracy, and choose by the cost of errors.

Learning Goals

  • Build a scaled nearest neighbor classifier with scikit-learn.
  • Evaluate a classifier with a confusion matrix, precision, recall, and error cost.
  • Fit a logistic regression and choose a decision threshold by cost.

Chapter Flow

  • Nearest neighbors with scikit-learn
  • Evaluating classifiers
  • Logistic regression

What To Watch For

  • The main concept introduced in each section
  • The code pattern that supports the concept
  • The management question the method helps answer

Carry Forward

  • Use the section practice exercises to check runnable code skills.
  • Keep the notebook examples runnable.
  • Connect each method to interpretation, not just syntax.
  • Use the glossary terms when explaining results.