/Metrica-pitch-control

A python implementation of the paper Wide Open Spaces: A statistical technique for measuring space creation in professional soccer

Primary LanguageJupyter NotebookGNU Affero General Public License v3.0AGPL-3.0

A Python implementation of the paper Wide Open Spaces: A statistical technique for measuring space creation in professional soccer.

Currently only contains the team pitch control function (equation 2 in the paper) and some basic plotting/animation.

There's a Colab notebook here.

I've also tried optimising the code for both Wide Open Spaces & Beyond Expected Goals (Spearman, Sloan, 2018). Using a GPU Colab runtime and PyTorch, you can get a full game done in about 30 seconds for either model.

Spearman: https://colab.research.google.com/drive/1GPjXYEmDHxE6GPHNS3nN3mAjWRFEd-Z_?usp=sharing Fernandez-Bornn: https://colab.research.google.com/drive/18HcpBywUTKpgxxwrkx15g6skrWuKBQB7?usp=sharing