Projects3 of 7

Matchday ML

Win, draw and loss forecasts for the Premier League, La Liga, the NBA and the WNBA, each frozen at kickoff.

Matchday ML’s homepage, showing upcoming games with win, draw and loss probabilities.
ThreadfernReelRank

Matchday ML publishes pregame and live probabilities and keeps a permanent, timestamped record of what it said before every game, so anyone can check the model against what actually happened. It began in March 2026 as a different idea: an AI game narrator on Spring Boot and a language model. The version I shipped in September uses no language model at all. It’s a forecasting system that has to earn trust with its record.

53.4%
Premier League accuracy on 1,140 held-out games, against 43.2% for the prior baseline
66.4%
NBA accuracy on 3,941 held-out games
0.106
Premier League log-loss improvement over the baseline, 95% interval 0.083 to 0.130
4
leagues with trained models, plus an exploratory Champions League view
Next: How it works

How it works

  • Training happens offline in Python with scikit-learn. The chosen model’s parameters are exported, and the Next.js server evaluates them in Node, so serving needs no Python.
  • A Python scheduler collects fixtures and results every five minutes and posts timestamped bundles to an authenticated endpoint. Live scoreboards are refreshed every 30 seconds by the Node server and the browser.
  • Forecasts are saved at fixed checkpoints (a week ahead, the day before, confirmed lineups, and every 15 minutes near kickoff) and frozen once the game starts.
  • It runs as Docker Compose (app, collector and Caddy) or as one Render service with a 1 GB disk and SQLite.
Next: Modelling and evaluation

Modelling and evaluation

The Premier League model sees 39 features: Elo ratings, points per game over the last 5 and 10 matches, goals for and against, home and away form, the opponent’s strength, table position, rest days and whether a team was just promoted. Each date is scored before that day’s results are added, so nothing from the future leaks in.

Candidates included logistic regression, random forests, gradient boosting, ensembles, time-weighted Poisson goal models and, for La Liga, CatBoost models on expected goals. Models are developed on the 2020/21 to 2022/23 seasons and judged once on 2023/24 to 2025/26, and they’re chosen by log loss, not accuracy, because a forecast should be honest about how sure it is.

Held-out results
LeagueChosen modelGamesAccuracyLog lossBrier
Premier LeagueGoals plus recent form1,14053.4%0.9830.586
La LigaRecent xG plus goals1,14053.6%0.9680.575
NBALogistic plus boosting3,94166.4%0.6080.420
WNBALogistic regression83266.8%0.6130.424
  • Results come with calibration, per-class scores and a paired bootstrap over blocks of dates (2,000 resamples), not just accuracy.
  • A live model only replaces the old one if it beats it by at least 0.002 in log loss with a positive bootstrap lower bound, and that rule is written down before fitting. The Premier League and La Liga upgrades passed; the NBA and WNBA ones didn’t, so those leagues kept their models. The project notes that an earlier threshold wasn’t written down in advance.
  • Exported models are checked against Python on 100 sample games per league, so Node and Python give the same numbers.
Next: Running it for real

Running it for real

The disk filled upOn 19 September about 660 MB of context snapshots and 257 MB of checkpoints filled the 1 GB disk.

Old records are compressed with gzip only when that saves at least 10%, each one checked byte for byte after a round trip, and nothing is deleted.

A data provider started refusing requestsESPN’s football date-range requests began returning HTTP 400.

A bounded fallback asks one day at a time, and team-name aliases (Ipswich, Coventry, Deportivo) fail closed rather than guessing.

The same playoff game from two providersDuplicate games would have double-counted results.

Games are de-duplicated across providers before they’re stored.

Next: Limits and next

Limits and next

Where it falls short

  • The held-out seasons are a reused benchmark, and only a handful of games had genuine saved pregame forecasts at launch, so the live record is still short.
  • Draws are almost never predicted (0 of 279 in the Premier League holdout), and 2025/26 Premier League accuracy so far is 48.7%.
  • Injuries, lineups and trades aren’t in the models yet, and the Champions League model is exploratory, not a validated classifier.

What’s next

  • Repair the historical data first, then try a Dixon–Coles model.
  • Player-impact and minutes features for basketball, and full play-by-play live models.
  • A forward test that judges the models only on games after they were frozen.
Next: Built with

Built with

Interface

Services

Models

Data

Delivery

Bigger tiles are tools I use in more places, across my projects and my job at Payaza.

Next project: ReelRank