Classification Threshold Lab

Model Fitting Decision Thresholds

See why the default 50% decision cutoff rarely maximises profit in marketing. Set error costs and revenue, drag the threshold, and watch net profit rise or fall in real time.

👨‍🏫 Professor Mode: Guided Learning Experience

New to classification thresholds? Enable Professor Mode for step-by-step guidance through finding the profit-maximising threshold and understanding when the formula breaks down!

OVERVIEW & WHAT THIS TOOL SOLVES

Every churn, lead-scoring, or fraud model outputs a continuous probability between 0 and 1, yet turning that score into an action list requires picking a decision threshold (T). Leaving the cutoff at the software default of 0.50 implicitly assumes a false positive costs the exact same dollar amount as a false negative, an assumption that rarely holds in marketing. The Classification Threshold Lab links confusion-matrix trade-offs directly to unit economics to find the exact profit-maximizing cutoff T*.

🎯 Questions It Answers

  • What probability cutoff T* maximizes net campaign profit given our outreach cost, save rate, and customer lifetime value?
  • How much money do we leave on the table if we use the default T = 0.50 or optimize a purely statistical metric like F1 or Youden's J?
  • What is the best threshold when our call center or sales team has a hard capacity cap (for example, it can make only 120 calls a week)?

📂 What Data You Need

  • Scored Holdout Dataset: Preset marketing cases (subscription churn emails, telecom retention calls, B2B lead scoring) or an uploaded CSV with predicted_prob (0 to 1) and actual_outcome (0/1)
  • Payoff Inputs (Unit Economics): Gross revenue per true positive (R), action cost per contact (CFP) and the cost of a missed positive (CFN)
  • Capacity Constraint (Optional): The most customers your team can act on in the scored list, as a count

💡 What You'll Discover

  • Profit Curve & Optimal Cutoff T*: Net dollar payoff at every threshold from 0 to 1
  • Live Confusion Matrix & Metric Trade-Offs: How Precision, Recall and Accuracy shift as you drag T
  • Capacity Cutoff: The lowest threshold that keeps the list within your team's capacity, with its confusion matrix and profit
  • Multi-Rule Comparison Table: Side-by-side outreach volume, confusion matrix, Precision, Recall, Accuracy, F1, Youden's J, and profit. Compares your current threshold, T = 0.50, capacity cutoff, profit-maximising T*, Max F1, and Max Youden's J.
🔍 Key Nuances & Common Traps to Watch For
  • Why T = 0.50 Is Almost Always Wrong: Suppose a $10 retention offer has a 30% chance of saving a $600 subscriber ($170 expected TP benefit), while wasting it on a loyal customer costs $10. Contact anyone with churn risk above 10 / (170 + 10) ≈ 5.6%, not 50%.
  • Changing the Threshold Does Not Refit the Model: Dragging T moves your operating point along the exact same ROC and Precision–Recall curves without changing customer rankings or AUC.
  • Calibration Prerequisite: The theoretical break-even threshold formula assumes your model's probabilities are calibrated to the true population rate (if you oversampled training data, recalibrate first in the Rare Event Calibration Lab).
📐 Under the Hood: Model Equations & Variable Definitions

1. Expected Campaign Profit Curve & Theoretical Break-Even Threshold (T*)

\[ \Pi(T) = N_{\text{TP}}(T)\cdot V_{\text{TP}} - N_{\text{FP}}(T)\cdot C_{\text{FP}} - N_{\text{FN}}(T)\cdot C_{\text{FN}}, \qquad T^* = \frac{C_{\text{FP}}}{V_{\text{TP}} + C_{\text{FP}} + C_{\text{FN}}} \]

💬 Read it in plain English: Total campaign profit Π(T) equals the net gain from true positives minus wasted outreach cost on false positives (and any miss cost C_FN). Contact a customer whenever their calibrated probability exceeds C_FP / (V_TP + C_FP + C_FN). With the lab's inputs, V_TP = R − C_FP, which gives the C_FP / (R + C_FN) formula shown in Step 5.

T, T*
Decision Cutoff & Profit-Optimal T*YOUR DATA ⓘ
Probability threshold above which a customer is flagged positive (ŷ = 1), and the profit-maximizing cutoff.
NTP(T), NFP(T), NFN(T)
Confusion Matrix Counts at TOUTPUT ⓘ
Counts of True Positives, False Positives, and False Negatives produced at cutoff T.
VTP, CFP, CFN
Unit Economic Payoffs & CostsYOUR DATA ⓘ
Net dollar benefit of catching a true positive (R − CFP in the lab's inputs) and unit costs of false-positive and false-negative errors.
Π(T)
Net Campaign Profit at Cutoff TOUTPUT ⓘ
Total expected dollar payoff across the scored cohort when operating at threshold T.

2. Precision, Recall (Sensitivity), F1 Score & Youden's J Statistic

\[ \text{Precision}(T) = \frac{\text{TP}}{\text{TP} + \text{FP}}, \qquad \text{Recall}(T) = \frac{\text{TP}}{\text{TP} + \text{FN}}, \qquad F_1(T) = \frac{2\cdot\text{Prec}\cdot\text{Rec}}{\text{Prec} + \text{Rec}}, \qquad J(T) = \text{TPR}(T) - \text{FPR}(T) \]

💬 Read it in plain English: Lowering T catches more true positives (higher Recall/TPR) at the cost of more false alarms (lower Precision, higher FPR). F1 and Youden's J balance these rates without using dollar costs.

Precision(T)
Positive Predictive ValueOUTPUT ⓘ
Share of contacted customers at threshold T who are actual positive cases.
Recall(T) / TPR
Sensitivity / True Positive RateOUTPUT ⓘ
Share of all actual positive cases successfully caught at threshold T.
F1(T), J(T)
Harmonic Mean & Youden’s IndexINFERENCE ⓘ
Cost-agnostic statistical criteria balancing Precision/Recall (F₁) or Sensitivity/Specificity (J).
📚

Use a Case Study

Select a case study above to load data and see the business context.

📤

Upload Your Data

Drag & Drop scored data file (.csv, .tsv, .txt, .xls, .xlsx)

Needs columns: predicted_prob (0–1 score) and actual_outcome (0 = negative, 1 = positive).

No file uploaded.

👆 Load a case study or upload your own scored dataset to begin the analysis.