Classification predicts a discrete class for each input, such as spam versus legitimate email or the digit in an image. This folder starts from the best possible classifier, the Bayes classifier, and then covers the model families that approximate it. Linear models come first, then margin-based and kernel methods, then a nonparametric method. Decision trees and their ensembles also classify, and they live in 5. Tree-Based Methods.
Prerequisites
- 1. Learning Paradigms, for supervised learning and the split between regression and classification.
- 2.2. Classification Metrics, for accuracy, precision, recall and ROC curves.
- 2.3. Generalization, for training error, test error and overfitting.
- 1.6 Bayes’ Rule, for posteriors computed from class densities and priors.
- 1.2.1 Maximum Likelihood Estimation, the fitting principle behind LDA and logistic regression.
- 6.4. Gradient Descent, the usual solver for logistic and softmax regression.
- 4.2. Lagrangian Duality, for the SVM dual.
Contents
- 4.1. Bayes Classifier: decision regions and boundaries, the Bayes decision rule and error rate, unequal costs, and the three approaches to classification.
- 4.2. Linear Discriminants: hyperplane geometry, multi-class argmax rules, LDA and QDA from Gaussian class densities, and Fisher’s discriminant.
- 4.3. Logistic Regression: the sigmoid model of the log-odds, binary cross-entropy, Newton’s method (IRLS), and divergence on separable data.
- 4.3a. Softmax Regression: the extension to classes, cross-entropy with one-hot labels, the gradient, and temperature.
- 4.4. Support Vector Machines: the maximum-margin hyperplane, hard and soft margins, and the hinge loss.
- 4.4a. SVM Dual: the Lagrangian dual, complementary slackness, and why only the support vectors matter.
- 4.4b. Kernel SVM: nonlinear boundaries from kernels, polynomial and RBF kernels, and tuning and .
- 4.5. k-Nearest Neighbors: majority vote among nearby points, the choice of , and the 1-NN error bound of twice the Bayes error.
Recommended path
Read 4.1. Bayes Classifier first, since every later note approximates it. Then read 4.3. Logistic Regression and 4.3a. Softmax Regression, the models used most in practice and the output layer of classification networks. Read 4.4. Support Vector Machines next for the margin view, which logistic regression approaches on separable data.