← All drillsBuild a Card-Fraud Detector
What you'll be able to do- ✓Show why a model that is 99.8% accurate and catches no fraud is worthless, and score rare events with precision-recall instead
- ✓Put a bootstrap interval on a metric measured from only a few dozen positives
- ✓Split transactions by time and explain why a shuffled split and early resampling both leak
- ✓Compare logistic regression, a random forest and gradient boosting fairly, over several seeds
- ✓Choose an alert threshold from what a missed fraud and a false alarm each cost
- ✓Check and repair probability calibration after class weighting, and report precision at the alert volume analysts can review
- ✓Write a model card that states what the model cannot see and when to stop trusting it
Do what a fraud analyst's team does with a new model — judge it on the right metric, test it on the future, set the alert threshold in money, and say how many alerts the team can review.
⌁ The fraud and risk scoring behind card payments and online checkout — Stripe, PayPal, American Express, Feedzai — and any team that must find a rare event among millions of normal ones.
Start this internshipCreate an account to unlock the 4 sections, the workbench, and askThili.
BeginSections
1. Build a Card-Fraud Detector
🔒 locked2. Lesson 1 - Why 99.8% means nothing
🔒 locked3. Lesson 2 - Boost, forest, and the threshold
🔒 locked4. Lesson 3 - Ship the decision, not the score
🔒 lockedDig deeper
📄Greedy Function Approximation: A Gradient Boosting Machine (Friedman, 2001, Annals of Statistics)
paper📄XGBoost: A Scalable Tree Boosting System (Chen & Guestrin, 2016, arXiv:1603.02754)
paper📄Random Forests (Breiman, 2001, Machine Learning 45(1))
paper📄The Relationship Between Precision-Recall and ROC Curves (Davis & Goadrich, 2006, ICML)
paper🔗OpenML creditcard dataset (id 1597) — origin Dal Pozzolo et al., 2015, IEEE CIDM
article