Part 03 / Topic 6 of 6
Baselines
Before any model, compute the dumbest possible predictor's score. For classification that is the majority class: always predict "no churn".
df = make_churn()
baseline = max(df["churned"].mean(), 1 - df["churned"].mean())
print(round(baseline, 3)) # 0.701
Any churn model scoring near 70% accuracy has learned nothing. This single number reframes every later result: the from-scratch model in Part 4 reaches 0.77 — a real (if modest) gain over 0.701, not "77% = great".
Simple-rule baselines are the next step up: "predict churn if contract is month-to-month" costs one line and sets a stronger bar.
🧪 Quick quiz
- The churn data has 30% positives. What accuracy does "always predict no churn" get?
Show the answer
70% — the majority-class baseline. A model is only useful if it beats that.
Done here? The practice set for Part 3 — 4 exercises with solutions — is on the part page.