惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
B
Blog
博客园_首页
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
M
MIT News - Artificial intelligence
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
量子位
V
V2EX
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
I
InfoQ
博客园 - 【当耐特】

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I open-sourced a World Cup 2026 prediction model — and te...
Jerry Chen · 2026-05-31 · via DEV Community

Jerry Chen

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 }

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%  █████████████

The part I actually care about: is it any good?

Anyone can spit out percentages. The hard question is whether they mean anything. So I tested it the honest way — walk-forward, out-of-sample. The script steps through 920 real internationals (Oct 2023 → May 2026) in date order, predicts each match using only data available before kickoff, then reveals the result and updates the ratings. No hindsight, no curve-fitting. One command reproduces it:

$ node backtest.mjs

=== Walk-forward backtest — 770 of 920 matches ===
MODEL
  Accuracy (top pick):   61.0%
  Favourite acc (p≥50%): 66.8%
  Brier (3-way, ↓):      0.536
BASELINES (same matches)
  Always pick home:      48.6%
  Coin-flip (uniform):   Brier 0.667

So: ~61% correct on a three-way (win/draw/loss) outcome, versus 49% for "always pick home" and ~33% for a coin toss. When the model had a clear favourite, it was right about two times in three. The Brier score (0.54 vs 0.67 for uniform) says the probabilities carry real information, not just the top pick.

What I learned (and what I won't claim)

  • It is not state-of-the-art, and it does not beat the betting market. A 61% hit rate also means ~2 in 5 matches surprise it — by design. Draws are genuinely the hardest thing to predict, and a 7-game tournament is dominated by variance.
  • Transparent baselines are underrated. No deep learning, ~300 lines of plain Node, zero dependencies — and it still lands in the same ballpark as far fancier models for tournament-level questions.
  • Calibration > accuracy. Getting the probabilities shaped right matters more than the headline hit rate, especially for a bracket simulation.

Try it / see it live

Clone it and run the backtest yourself (Node 18+, no deps):

git clone https://github.com/Hicruben/world-cup-2026-prediction-model.git
cd world-cup-2026-prediction-model
node backtest.mjs      # reproduce the numbers
node predict.mjs spain germany

The full 48-team tournament simulator (10k sims, live title odds, an interactive bracket) runs the same engine at cup26matches.com, and there's a plain-English write-up of the methodology and the backtest here.

I'd genuinely love feedback on the modelling — the Dixon-Coles ρ, the home-field handling, the best-third tiebreaks. Tear it apart in the comments or open an issue. ⭐ the repo if it's useful!