Build Your Own xG Model

Build Your Own xG Model

Expected Goals (xG) is the most important machine learning model in football.

Most elite clubs are using some form of xG model – some to monitor performance, some to improve their set-piece routines and some to talk to players about how to get in better shooting positions.

This interactive follow-along Masterclass teaches you how the model works. By the end of the session you will be able to create a shot map, showing where all the shots occurred during a match, and rank each shot on the basis of expected goals (xG).

By learning how xG works, you will then be able to move onto other machine learning models more easily.

The Masterclass is with renowned data scientist Professor David Sumpter, who has worked with leading football clubs and federations, including Ajax, Barcelona and England.

Format of the session:

  • Intro Lecture: What are Expected Goals?
  • Follow-along: Shot map and histogram of shot data.
  • Follow-along: Fitting models with distance.
  • Follow-along: Creating your own xG model.
  • Closing Lecture: Advanced xG models and other machine learning models.

By signing up you will learn you to:

  • Get your environment set up in Python.
  • Instal libraries.
  • Fit an xG model to Wyscout data using the Stats model in Python.
  • Interpret co-efficients in a model.
  • Incorporate tracking data into xG models.

You can also find David’s slides from the session in the ‘Extras’ section on this website.

Read more

Set Pieces are a fundamental part of the modern game. In our Masterclass, former Newcastle United Analyst Billy Coulston will help improve your understanding, preparation & delivery of Set Pieces.

Harsh Krishna introduces you to R & RStudio and shows how they can be used with football event data. What are R and RStudio? What are they used for? How can they be useful in a football context? Learn all that and more with this masterclass.

ChatGPT and other Large Language models are changing how we write and read texts. In this Masterclass, Professor David Sumpter will explain what they can and can’t do and show you how to make the most of the new technology in scouting.