JC
← Back to projects
TA

Tennis AI

Calibrated ML model that predicts ATP match winners, trained on 16 years of matches.

PythonXGBoostscikit-learnpandasNumPyjoblibmatplotlib
65.9%test accuracy / 18,842 matches
accuracy by year · illustrative
calibrated win probabilitybrier 0.213

Problem

Predicting a tennis match means weighing ranking, form, surface and physical factors. The goal is reliable win probabilities, not just a guess.

Solution

An XGBoost classifier wrapped in sigmoid calibration (CalibratedClassifierCV, 5-fold) using 30 pre-match features including ranking, age, height and surface Elo.

My role

Solo project: data pipeline, feature engineering, modeling, calibration and validation.

Highlights

  • Chronological 80/20 split on 2010–2026 matches to avoid lookahead bias
  • Detected and fixed a data leakage bug that produced a fake ~100% accuracy
  • No in-match stats used — predictions rely only on pre-match information
  • Walk-forward validation year by year

Results

  • 65.9% accuracy on 18,842 test matches
  • Brier score of 0.213
  • Beats a surface-Elo baseline by ~2 points

Interactive demo

demo

Illustrative demo only — a simplified Elo-style formula, not the production model.

0
0

Win probability — Player A

50%
50%
Player APlayer B

Links