Classification with unequal costs

Section of Statistical classifiers and discriminant analysis, part of Statistical learning

Classification with unequal costs

Type Section
Taught in Statistical classifiers and discriminant analysis
Part Statistical learning

When a missed case and a false alarm are different events, the loss has to say so. A correct classification is still taken to cost nothing. What moves the rule is the ratio of the costs of the two mistakes. Scaling every cost by the same positive constant scales the risk and leaves the minimiser unchanged, so a false negative several times as costly as a false positive is fully described by that ratio.

For general costs c_{gh}, with c_{gg}=0, the loss on a new observation (\mathbf{x},\mathbf{y}) is l(\mathbf{y},\eta(\mathbf{x}))=\sum_g y_g\, c_{g,\eta(\mathbf{x})}. The same expectation as before, now with cost c_{gh} in place of 1, gives the conditional risk

\mathbb{E}\bigl[l\bigl(Y,\eta(\mathbf{x})\bigr)\bigm|X=\mathbf{x}\bigr] =\sum_{g\ne\eta(\mathbf{x})}\tau_g(\mathbf{x})\,c_{g,\eta(\mathbf{x})}.

At each \mathbf{x}, choose the predicted class that makes this sum smallest:

\eta(\mathbf{x})=B(\mathbf{x}) =\arg\min_{h\in\{1,\ldots,G\}}\sum_{g\ne h}\tau_g(\mathbf{x})\,c_{gh}.

For two classes the comparison simplifies. The rule predicts class 1 when \tau_2(\mathbf{x})\,c_{21}<\tau_1(\mathbf{x})\,c_{12}, which is \tau_1(\mathbf{x})/\tau_2(\mathbf{x})>c_{21}/c_{12}. The threshold on the posterior odds moves toward the class whose misclassification costs more. Equal costs put the threshold at 1 and recover the maximum-posterior rule. The posteriors themselves still come from Bayes’ theorem. Only the cutoff has changed.

Used in

See also

Training data and classifier · Posterior class probability · Zero–one loss and risk · Bayes-optimal rule · Fisher’s direction · Classification problem · Bayes classifier · Error rates and optimal classifiers

Glossary and index