About AFL Pickems

How It Works

AFL Pickems uses machine learning to predict the winner and margin of every AFL match. We train multiple model types on 10 years of historical data (2016–2025) and select the best performer using walk-forward cross-validation.

Model Approach

Each match prediction is based on a regression model that predicts the margin (home score minus away score). The predicted winner is derived from the sign of the margin, and confidence is calculated using a sigmoid function of the absolute margin.

We evaluate four model types—Ridge Regression, Random Forest, XGBoost, and LightGBM—and automatically promote the best performer to production.

Features

Over 100 features are engineered for each match, grouped into categories:

  • Team form (rolling averages, win streaks, scoring trends)
  • Team strengths and weaknesses (offensive, defensive, contested ball, pressure)
  • Head-to-head matchup analysis (style clashes, H2H record)
  • Player form and availability (individual stats, impact scores)
  • Venue factors (ground record, interstate travel)
  • Weather conditions (rain, wind, temperature effects)
  • Contextual factors (derbies, rest days, ladder position, finals pressure)

Data Sources

  • Squiggle API — match results, scores, venues
  • Footywire — player-level statistics
  • Bureau of Meteorology — weather conditions

Backtesting

We validate accuracy using walk-forward backtesting: for each season from 2017 to 2025, we train only on prior seasons and predict the next one. This prevents data leakage and gives a realistic estimate of real-world accuracy.

Built with FastAPI, Next.js, scikit-learn, XGBoost, and LightGBM.