Quant Memo
Core

Cost-Sensitive Evaluation With Asymmetric Errors

When a false positive and a false negative cost genuinely different amounts of money, evaluating a model by accuracy alone can rank the wrong model as best — this covers building an evaluation metric out of the actual dollar costs instead.

Prerequisites: The Confusion Matrix and Classification Metrics, Choosing the Operating Point

Imagine two credit models with identical accuracy of 92%. Model A makes its mistakes mostly by rejecting good borrowers; model B makes its mistakes mostly by approving loans that later default. If a default costs the bank $20,000 and a rejected good customer costs $200 in lost fee income, these two "equally accurate" models are nowhere close to equally good — model B is a financial disaster and accuracy alone can't tell you that. Cost-sensitive evaluation replaces accuracy (which silently treats every mistake as equally bad) with a metric built directly from the actual dollar costs of each error type.

Building the metric

Start from the confusion matrix — true positives, false positives, true negatives, false negatives — and attach a cost to each cell instead of just counting it. The total expected cost of a classifier's predictions on a batch of nn cases is:

Total Cost=FP×CFP+FN×CFN\text{Total Cost} = FP \times C_{FP} + FN \times C_{FN}

where FPFP and FNFN are the counts of false positives and false negatives, and CFPC_{FP}, CFNC_{FN} are their respective dollar costs (true positives and true negatives are usually treated as costing nothing extra, though they can carry a benefit term too). In plain English: instead of asking "how many mistakes did the model make," cost-sensitive evaluation asks "how much did the mistakes it made actually cost," which is a completely different ranking whenever the two error types aren't equally expensive.

Worked example: re-ranking two models by cost, not accuracy

On a 1,000-loan validation set with a 5% default rate, Model A produces 10 false positives (rejects good borrowers) and 40 false negatives (approves defaulters); Model B produces 60 false positives and 15 false negatives. Both hit roughly 92-95% accuracy. Using C_{FP} = \200andandC_{FN} = $20{,}000$:

Model A's cost: 10×200+40×20,000=2,000+800,000=802,00010 \times 200 + 40 \times 20{,}000 = 2{,}000 + 800{,}000 = 802{,}000, i.e. $802,000. Model B's cost: 60×200+15×20,000=12,000+300,000=312,00060 \times 200 + 15 \times 20{,}000 = 12{,}000 + 300{,}000 = 312{,}000, i.e. $312,000.

Despite similar or even better raw accuracy, Model A costs the bank two and a half times more than Model B, because it lets through more of the expensive error type. An accuracy leaderboard would never surface this; a cost-based leaderboard flags it immediately.

\$802,000 Model A \$312,000 Model B
Both models score roughly the same accuracy, but Model A's mistakes skew toward the far more expensive error type, making its true expected cost more than double Model B's.

What this means in practice

Cost-sensitive evaluation is what actually determines which model gets deployed once real dollar amounts are at stake — accuracy, precision, and recall are useful diagnostics, but the deployment decision should run through an explicit cost table whenever the two error types differ in consequence, which in finance is almost always. It also feeds directly into threshold selection: once you have CFPC_{FP} and CFNC_{FN}, the cost-minimizing operating point follows directly, and you can compare any two models — even ones built with entirely different architectures — on the single number that matters: expected dollars lost.

Rank classifiers by expected dollar cost (FP×CFP+FN×CFNFP \times C_{FP} + FN \times C_{FN}), not by accuracy, whenever the two error types have different real-world consequences — accuracy treats a $200 mistake and a $20,000 mistake as identical, and a cost table does not.

The classic mistake is estimating CFPC_{FP} and CFNC_{FN} loosely from intuition and then treating the resulting cost ranking as precise. Because the ranking of models can flip entirely depending on the cost ratio, it's worth checking how sensitive the conclusion is to reasonable changes in those cost estimates before committing to a deployment decision based on them.

Related concepts

Practice in interviews

Further reading

  • Elkan, The Foundations of Cost-Sensitive Learning
ShareTwitterLinkedIn