When should a classifier change its mind?
BeginnerPR 01 · Patterns, Probability and Bayes DecisionsInteractive plot
Description
Move a decision boundary by changing class frequency and the cost of a false alarm.
Try this: Keep the observation fixed. Can increasing the false-positive cost switch the decision without changing the posterior?
Hints
The chapter section that uses this lab:
Lab · When should a classifier change its mind?
- Decision boundary x
- 0
- Posterior P(1 | x)
- 0.731
- Required posterior for class 1
- 0.5
At x = 0.5, choose class 1. Compare conditional risks: choosing 0 costs 0.731; choosing 1 costs 0.269. The boundary obeys 2x + log(prior odds) = log(false-positive cost).
Try this: Keep the observation fixed. Can increasing the false-positive cost switch the decision without changing the posterior?
A synthetic population: X|class 0 ~ N(−1,1), X|class 1 ~ N(1,1). The slider sets the true class prior. A false negative costs 1; correct decisions cost 0. Curves show class-conditional densities, not posterior probabilities.