Chapter 4

Chapter 4: Multiclass Classification

Automated Ticket Routing: Multiclass Classification

Chapter 4 illustration

Minermontโ€™s emergency desk is overwhelmed, and Ethan partners with Claire to build multiclass triage support that assists nurses while keeping humans in control.

This chapter focuses on multiclass classification: extending classifiers beyond yes/no decisions, evaluating performance per class, and using ensemble methods to improve robustness.

  1. 4.2 Multiclass Strategies: One-vs-Rest (OvR) and One-vs-One (OvO): You'll discover how to extend binary classification algorithms to problems with multiple classes. You'll compare One-vs-Rest (OvR) and One-vs-One (OvO) strategies, understanding when to use each in more complex real-world settings.

  2. 4.2 K-Nearest Neighbors (K-NN): You'll explore an algorithm based on the wisdom of the crowd. You'll see how the simple idea of classifying a new case based on its closest neighbors can be surprisingly powerfulโ€”and understand Marta and Luis's concerns about the choice of distance metric and the "curse of dimensionality."

  3. 4.2 Decision Trees: You'll build a model that mimics human reasoning. You'll discover why Teresa and Javier felt so aligned with this approach, which creates a set of explicit, easy-to-follow rulesโ€”much like a troubleshooting flowchart.

  4. 4.2 Random Forests: You'll explore how multiple decision trees work together like a team of specialists. You'll see how combining independent predictions improves accuracy and reduces overfitting, making classifications more reliable.

  5. 4.3 Multiclass Confusion Matrix: You'll learn to evaluate multiclass classifiers using the confusion matrix. You'll interactively explore how to calculate True/False Positives/Negatives, Precision, Recall, and F1-Score for each class, and how to interpret these metrics when you're routing requests into multiple queues.

Algorithm Pseudocode

Mathematical Foundations

  • ๐Ÿ“ Evaluation Metrics Algebra: Formal derivations of confusion matrices, precision/recall variants, and multiclass ROC/AUC underpinning the evaluation dashboards discussed in the chapter.
  • ๐Ÿ“ Naive Bayes Foundations: Bayesโ€™ rule, smoothing strategies, and interpretability hooks that justify Almaโ€™s confidence in the modelโ€™s probabilistic reasoning.

Bibliography and Additional Resources