← All runs / RUN #001Next · RUN #003 →
World Cup 2026 predictor
Which team characteristics go with winning a World Cup? I trained five models on every tournament since 1998 and ranked the 48 teams for 2026.
- Client
- Data mining project · sports analytics
- Role
- Data · features · modelling
- Timeline
- 3 weeks
- Stack
- Python · scikit-learn · XGBoost · SQLite
- Status
- Completed
01 — The system
Trigger01Load match dataresults 1872–2024 · FIFA ranks
Code02Build the warehouseSQLite · star schema
Code03Engineer features2-year window · no leakage
Model04Compare 5 modelstrain 1998–2018 · test 2022
Model05Rank the 48 teamslogistic regression · 2026
02 — Results
48teams ranked by win probability for 2026
5classifiers compared on a temporal split
224team-tournament rows from 1998 to 2022
03 — The problem
Predicting a World Cup winner is a tiny-data problem dressed up as a big one: there are 150 years of matches, but only one winner per tournament. I wanted to see which pre-tournament signals actually go with winning, without letting the tournament itself leak into the features.
04 — Decisions & tradeoffs
- A star-schema warehouse. Match results from 1872 to 2024 and FIFA rankings go into SQLite: a match fact table with team, tournament and date dimensions.
- Six features, from the two years before each tournament: win rate, goals scored and conceded per game, FIFA rank, host status and confederation. Matches from the tournament itself are excluded to prevent leakage.
- A temporal split, not a random one. Train on 1998–2018, validate on 2022 (won by Argentina).
- One winner per ~32 teams is heavy class imbalance, handled with balanced class weights. I compared Logistic Regression, Decision Tree, Naive Bayes, Random Forest and XGBoost on accuracy, precision, recall and F1. Logistic Regression generalised best.
05 — What's next
With one positive example per tournament, any single prediction is fragile. Next I'd add Elo ratings and squad-level data, and evaluate with leave-one-tournament-out across every World Cup instead of one validation year.