Loading the accounts

Cutoff and Cost Trainer

Week 11 · the confusion matrix · precision and recall · the cost of each mistake · ROC and AUC
AI tutor. The tutor on this page can see the cutoff, the costs and your guess. It usually answers with a question, and it will not talk about the cheapest cutoff until you lock in a guess.

The logistic model gives each Summit Gear account a probability of default. Credit needs a decision: review the account before its next order ships on terms, or let it through. This page works on the deck's 440 held-out accounts, the ones the model never saw while it was fit, and 88 of them defaulted. One cutoff drives everything below: flag an account when its probability is at or above the cutoff. Move it in the bar and watch four things change: the confusion matrix, precision and recall, the total cost, and where the model sits on its ROC curve.

Cutoff 0.50
1 · The confusion matrix

Four kinds of call

Every account lands in one of four cells. Two are right calls: caught (it defaulted and the model flagged it) and cleared (it did not default and the model let it through). Two are mistakes: a false alarm costs a review nobody needed, and a missed default costs the loss. The table of those four counts is the confusion matrix. In the picture, each square is one account, placed by its predicted probability, with accounts that did not default above the axis and accounts that defaulted below it.

Click a measure on the right to see which cells it uses.

Accuracy against the flag-nobody benchmark.
2 · The trade-off

Precision and recall across cutoffs

Lower the cutoff and the model flags more accounts. It catches more of the defaults, so recall rises, but more of the flagged accounts turn out not to default, so precision usually falls. Raise the cutoff and the reverse happens. No cutoff gets both near 100% on these accounts. Which one to give up depends on what each kind of mistake costs, and section 3 puts dollars on that.

3 · What each mistake costs

What each mistake costs, and the break-even probability

Credit's working assumptions: a review costs about $400 of analyst time, and a default nobody sees coming costs about $2,000 after recoveries. A review is assumed to prevent the loss on a defaulter it catches. So every flagged account costs a review, and every missed default costs the loss:

total cost = (caught + false alarms) × review cost + missed × cost of a missed default

The break-even probability

Your guess first

Before the total-cost curve appears: which cutoff do you think costs the least on these 440 accounts, at the costs above? Use the break-even, and the matrix in section 1, where you can work out the cost of any cutoff from its four counts.

The total-cost curve, and the total cost of the cutoff in the bar, appear here after you lock in a guess.
4 · ROC and AUC

ROC and AUC: how well the model ranks

Every cutoff gives one pair of numbers: the share of defaults caught (the true positive rate, which is recall) and the share of accounts that did not default but were flagged anyway (the false positive rate, false alarms / all accounts that did not default). The ROC curve plots that pair for every possible cutoff, from flag nobody at the bottom left to flag everyone at the top right. The dashed diagonal is what flagging accounts at random would do.

AUC on the 440 held-out accounts
The AUC is the area under the ROC curve. It runs from 0 to 1, where 0.5 is a ranking no better than chance and 1 is a perfect ranking. It is also the chance that a randomly picked account that defaulted gets a higher predicted probability than a randomly picked account that did not default, with ties counted as half.
AUC judges how well the model ranks accounts across every cutoff, so moving the cutoff does not change it. It also leaves out what each mistake costs, so choosing a cutoff still comes down to the costs in section 3.