Skip to content

Latest commit

 

History

History
72 lines (54 loc) · 3.11 KB

File metadata and controls

72 lines (54 loc) · 3.11 KB

TabPFN Football Predictions

This repository is a template to participate in Prior Labs' World Cup Game Outcome Prediction competition. It has a basic script that outputs predictions with a standard prediction template. Use this template to generate predictions. The predict.py script should only be a source of inspiration, feel free to fork the repo and add your own ideas.

The script predicts international football match outcomes using TabPFN using the client repository. It achieves ~59% accuracy and ~0.86 log-loss on held-out data. There is a good margin of progression. We look forward to your submission!

The model is trained on engineered features: ELO ratings, recent form, head-to-head record, rest days, and tournament importance. Data comes from martj42/international_results.

Setup

git clone https://github.com/eliott-kalfon/tabpfn-football-predictions.git
cd tabpfn-football-predictions
pip install -r requirements.txt

Run

python predict.py

This will:

  1. Download the full international results dataset (~47 000 matches) on first run
  2. Build features with a single chronological pass (no leakage)
  3. Run a quick backtest on the previous calendar month and print accuracy + log-loss
  4. Train on up to 10 000 recent matches and predict all upcoming fixtures
  5. Save predictions to predictions_YYYYMMDD.csv and print them to the console

To refresh the dataset from source before predicting:

python predict.py --refresh

Output

Latest game in dataset: 2026-06-14
Data freshness: 0 days 18:32:11

Backtest 2026-05 (87 matches): accuracy 59%, log-loss 0.861

142 fixture predictions -> predictions_20260616.csv

  2026-06-18           Argentina vs Australia             -> home_win   H  72% | D  17% | A  11%
  2026-06-18              France vs Morocco              -> home_win   H  61% | D  23% | A  16%
  ...

Features

Feature Description
elo_diff ELO gap (home + home advantage - away)
home_elo, away_elo Current ELO ratings
form5_diff Difference in average points per game over last 5 matches
form10_diff Same over last 10 matches
home_winrate, away_winrate Win rate over last 10 matches
home_gf5, away_gf5 Goals scored per game over last 5 matches
home_ga5, away_ga5 Goals conceded per game over last 5 matches
gd10_diff Difference in average goal difference over last 10 matches
home_streak, away_streak Current win streak
home_rest, away_rest Days since last match (capped at 90)
home_played, away_played Total matches played in history
h2h_n Number of head-to-head meetings
h2h_home_winrate Home team win rate in head-to-head
h2h_draw_rate Draw rate in head-to-head
h2h_gd Average goal difference in head-to-head (from home team's perspective)
neutral 1 if played at a neutral venue
importance Tournament importance score (60 = World Cup, 20 = friendly)