Skip to content
Varun Rout
← Back to work

Football analytics · honest result

Live repoOpen data (StatsBomb)

Contextual Football Metrics

CxG / CxA / CxT training pipeline

View the repo →

What this is

A contextual expected-goals, assists and threat pipeline. My own audit found leakage in all three, and with causal features the context adds nothing measurable and StatsBomb’s own xG stays ahead.

Metrics

Causal contextual xG

0.8037 ROC AUC

vs StatsBomb xG 0.8295, 1,340 Euro 2024 shots

Against StatsBomb xG

Log loss +0.014 worse [0.001, 0.028]

match-clustered paired bootstrap

Does context help?

Euro 2024: log loss -0.0025 [-0.0076, +0.0029]

vs traditional logistic 0.7996; on La Liga it is worse, +0.0123 [+0.0025, +0.0205]

Honesty

Earlier figures, including 0.8131, came from leaky features and are withdrawn

Testing

571 tests pass and 9 skip, run locally from the lock file

Stack

PrefectMLflowPyTorchMatch-clustered bootstrapStatsBomb

Provenance

The audit found whole-possession aggregates stored as pre-action features in all three metrics, and faulty CxA and CxT labels. Euro 2024 was used for selection in earlier work, so it is not an untouched test set. Hosted CI is not running because of an account billing lock, so the tests were run locally.

What I would not claim

  • catboost
  • captum
  • plotly
  • kaleido
  • imbalanced-learn
  • DVC-tracked pipeline
  • cloud/GPU training
  • beating StatsBomb xG
  • working hosted CI