01 · Probabilistic forecasting — UW–Madison research
World Cup 2026 Bayesian Forecaster
A PyTorch policy-gradient network with a Bayesian neural network head (Monte Carlo weight sampling), an XGBoost weather sub-model, temperature-scaled calibration, and a Monte Carlo tournament layer — served via FastAPI in the real system. Brier score 0.24 → 0.176.
WORLD CUP 2026 · WHAT THE MODEL PREDICTED
The model opened the tournament backing 🇦🇷 Argentina as favourite — and ended it predicting 🇪🇸 Spain to lift the trophy.
① INITIAL PREDICTION
Locked before kickoff · 5,000 Monte Carlo tournament simulations · June 11
CHAMPION PROBABILITY · TOP 5
- 1 🇦🇷 Argentina 12.9%
- 2 🇵🇹 Portugal 10.0%
- 3 🇧🇷 Brazil 9.7%
- 4 🏴 England 8.8%
- 5 🇪🇸 Spain FINAL PICK 8.6%
Argentina led the field. Spain sat fifth, at 8.6%.
② FINAL PREDICTION
After 103 real results fed back through the model · July 19
THE FINAL · SPAIN vs ARGENTINA
Most likely score 1–0. Re-simulating the cup from the real results, Spain now leads the title race at 43.6%.
HOW THE CALL MOVED
Both finalists came from the model's original top five — but as results landed and fed back through the network, it flipped which one it trusted to win it all.
HOW THE PREDICTIONS SCORED · GROUP + KNOCKOUT
Every pick graded against official results — the 72 group-stage calls locked before kickoff, plus 31 knockout calls the model made live as the bracket filled in.
63 of 103 correct — 61% across the whole tournament: 39 of 72 in the group stage (54%) and 24 of 31 in the knockout bracket (77%), on a 3-way home/draw/away call where chance is roughly 33%. The 0.176 figure is the cross-validated backtest Brier score (lower is better; 0.667 = uniform guessing).
KNOCKOUT STAGE · THE MODEL'S CALLS, GRADED
24 / 31 correct · 77%
The model's pick to advance in each knockout tie — from the Round of 32 to the Final — graded against who actually went through. It swept all four quarterfinals and backed Spain in every round it played. Ties level after extra time are decided on penalties (marked pens); the pick is graded on who advanced.
the football is the demo — the same model ports directly to these domains
📦 Demand forecasting
Slow-moving SKUs are low-count events, exactly like goals. Calibrated outcome probabilities + the Monte Carlo layer = inventory scenario planning with honest service-level estimates instead of point forecasts.
🏦 Credit risk
Default / cure / prepay is the same 3-way classification as win / draw / loss. Banks are required to prove calibration (Basel) — reliability diagrams, Brier decomposition and temperature scaling are the exact validation toolkit.
🛡 Insurance pricing
Claim frequency is count modeling under exogenous conditions. The XGBoost weather sub-model is literally a catastrophe-covariate block; calibrated probabilities are the difference between profitable and mispriced premiums.
🏭 Predictive maintenance
P(failure within 30 days) with epistemic uncertainty tells you not just what will break but when the model doesn't know — inspect exactly those assets. I shipped this pattern in production at Powertrac and Tata Motors.
🩺 Clinical risk scores
Readmission and complication models are only useful if 70% means 70% — miscalibrated scores erode clinician trust. The BNN spread flags the patients where the model should defer to humans.
⚡ Energy & finance
The time-decay feature weighting is EWMA from volatility modeling; Monte Carlo propagation of match uncertainty to title odds is the same machinery as load forecasting bands and portfolio scenario analysis.
📘 Model deep dive — architecture, features, training, calibration, serving
The problem
Football outcomes are low-count, high-variance events: a 3-way classification (home / draw / away) where even the best team loses often. The interesting challenge isn't predicting a winner — it's producing an honest probability, one you could bet on, plan inventory around, or price risk with. That's why the whole system is built around calibration rather than raw accuracy.
Features
Each fixture is described by engineered team-pair features: rolling form and attack/defense rates with time-decay weighting (the same idea as EWMA in volatility modeling), ranking deltas, rest and travel context, and host advantage. On top of that sit two live signals: an NLP pipeline that pulls RSS news, scores sentiment per team and per key player, and folds it into the features — and a weather block (temperature, humidity, precipitation, wind, cloud cover, pressure) for the actual stadium and kickoff window, which measurably shifts the outcome probabilities per fixture.
Architecture — three models, one ensemble
SNN: a PyTorch policy-gradient neural network over the engineered features, trained with a policy-gradient objective and emitting a 3-way softmax. It's the fast, deterministic baseline — one forward pass, one answer. BNN: the same backbone extended with a Bayesian output head. Instead of fixed weights, the head learns weight distributions; at inference I draw hundreds of Monte Carlo weight samples, each producing a slightly different network and prediction. The spread of those predictions decomposes into total uncertainty (predictive entropy), epistemic uncertainty (mutual information — what the model doesn't know because it hasn't seen enough data) and and the win-probability standard deviation produced by the Bayesian head. XGBoost weather sub-model: a gradient-boosted tree model that learns how weather shifts outcomes, feeding the ensemble. The final calibrated ensemble blends SNN and BNN with the weather signal and applies temperature scaling so that "70%" means 70%. On top sits a Poisson scoreline layer: it inverts the calibrated win/draw/loss probabilities into goal rates (λhome, λaway) and reports the most likely scoreline consistent with the pick — score predictions are a pure function of the same probabilities, not a separate guess.
Training & validation
Validated with 5-fold cross-validation and historical backtests; every variant comparison (e.g. weather on vs off) goes through McNemar tests in an A/B framework, so a feature only survives if it helps beyond noise. Calibration diagnostics — reliability diagrams, expected calibration error, Brier decomposition — plus experiment metadata are logged to PostgreSQL. Results: Brier score 0.24 → 0.176 (−26.7% vs baseline), recall 84%, scenario variance −17%.
The Monte Carlo tournament layer
Match probabilities become title odds by simulation: sample all 72 group fixtures from the ensemble's distributions, resolve standings (including the 8 best third-placed teams in the 48-team format), play the bracket to the final, repeat 5,000 times, and count champions. Uncertainty propagates from single matches all the way to the trophy — exactly the machinery behind the title odds above.
Serving & feedback
The real system runs behind FastAPI: REST endpoints for predictions, team data and result uploads, a post-match feedback loop that updates the model as results land, and the news pipeline refreshing sentiment features continuously. It's deployable software, not a notebook.
Why it generalizes
Calibrated low-count forecasting is the same problem as demand planning for slow-moving inventory, credit-risk PDs, and insurance claim frequency. The football is the demo; the method is the product.