Back to Home
I open-sourced a World Cup 2026 prediction model — and tested it honestly

I open-sourced a World Cup 2026 prediction model — and tested it honestly

B
Blizine Admin
·2 min read·0 views

Jerry Chen Posted on May 31 I open-sourced a World Cup 2026 prediction model — and tested it honestly # opensource # javascript # datascience # showdev Every World Cup, "supercomputer predicts the winner" headlines show up everywhere — and almost none of them let you see how the sausage is made. I wanted a forecast I could actually read, run, and argue with. So I built one for the 2026 World Cup, and I open-sourced the whole thing: 👉 github.com/Hicruben/world-cup-2026-prediction-model (MIT) No machine-learning black box, no scraped bookmaker odds — just three classic, transparent pieces. And, more importantly, an honest, reproducible test of how good it actually is. The model in three layers 1. Team strength (Elo). Every nation gets an Elo rating, seeded from long-run strength and then calibrated on hundreds of recent real internationals. Wins over strong sides in important games move a rating more than friendlies; recent form outweighs old form. 2. Each match (Dixon-Coles bivariate Poisson). Two ratings become expected goals, which feed a Dixon-Coles model to produce win/draw/loss probabilities. Dixon-Coles (1997) fixes a well-known flaw of plain Poisson: it under-counts the low-scoring draws (0-0, 1-1) that are so common in football. import { matchProb } from " ./elo.mjs " ; // Elo 2056 vs Elo 1951, neutral venue const p = matchProb ( 2056 , 1951 ); // → { winA: 0.45, draw: 0.26, winB: 0.29, expectedGoalsA: 1.6, expectedGoalsB: 1.2 } Enter fullscreen mode Exit fullscreen mode 3. The tournament (Monte Carlo). Play all 104 matches through the real bracket 10,000 times. Count how often each team reaches each round → championship and advancement probabilities. There's a tiny CLI to poke at it: $ node predict.mjs brazil argentina brazil ( Elo 1994 ) vs argentina ( Elo 2064 ) [ neutral] brazil win 26.7% ████████ draw 28.3% █████████ argentina win 45.0% █████████████ Enter fullscreen mode Exit fullscreen mode The part I actually care about: is it any good? Anyone can sp

📰Dev.to — dev.to

Comments