Structured data
Binary classification
churn, fraud, loan default, lead conversion
A yes/no outcome per customer or transaction, from tabular history.
Probability & Bayes
Odds & log-odds
Maximum likelihood
Information theory
Bias & variance
Hypothesis testing
Foundations
Log-odds and likelihood explain logistic regression; entropy explains tree splits; bias and variance explain why forests and boosting work; hypothesis testing is how you compare two models honestly.
Frame the problem
Frame
Define the unit (customer-month? transaction?) and the horizon. Decide up front what a false positive and a false negative each cost; that sets the metric.
Sourcing & signal
Exploring the data
Hunting for leakage
Labeling & data collection
Cleaning the data
Data & labels
Positives are rare; check they are labelled the same way across time and segments. Churn is usually a derived rule: write it down and test its edge cases. Anything computed after the event leaks: closure dates, chargeback flags, lifetime totals.
Encode & scale
Create features
Reduce & select
Represent
Rolling aggregates over history do most of the work. Every feature must be as-of prediction time. Target-encode high-cardinality ids inside CV folds.
Split the data
Cross-validation
Split
Group by customer. Go temporal if behaviour drifts. Stratify on the rare class.
Dumb baseline
Logistic regression
Decision trees
Bagging & random forests
Gradient boosting
Variants worth knowing
Credit risk is this playbook plus regulation: reason codes, monotonic constraints, reject inference. Fraud rings are a graph problem: transaction-graph features, or a GNN. Networks on the table itself only with text or image columns, or very large data.
Interpretability
Graph neural networks
Networks on tabular data
Model
Majority class, then logistic regression on a handful of features, then gradient boosting. Stop there unless you have a reason.
Loss functions
Hyperparameter tuning
Handle imbalance
Over- & underfitting
Ensembling
Calibration
Train
Class weights before SMOTE. Early stopping on a validation fold. Average a few seeds before reaching for stacking. Calibrate if the score feeds a threshold.
Classification metrics
Interpretability
Error analysis & significance
Evaluate offline
PR-AUC, not accuracy. Slice by tenure and segment. Pick the threshold from the cost of errors in step 1, not 0.5.
A/B testing & interleaving
Evaluate online
If the score drives an intervention such as a retention offer, test the intervention, not the score. See causal inference & uplift.
Features at serving time
Serving & release
Monitor & retrain
Ship & monitor
As-of features must be recomputed identically online. Acting on flagged users changes future labels; plan for the feedback loop.
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.