ML-KULeuven / soccer_xg

A Python package for training and analyzing expected goals (xG) models in soccer.
Apache License 2.0
149 stars 19 forks source link

How to calculate xG for a single shot in a local match #2

Open SMSadegh19 opened 8 months ago

SMSadegh19 commented 8 months ago

Hi. How can I calculate xG with your model for a single goal chance in a local match. There is no data available. Only video of the game is available. I want to watch the video and manually write the data and then, use soccer_xg to calculate xG of that.

probberechts commented 8 months ago

You can load one of the pretrained models, manually compute all required features and apply the model. But that would be tedious. Probably this is a better fit for your use case: https://torvaney.github.io/projects/xG.html

SMSadegh19 commented 8 months ago

Thanks a lot. In the code, how can I put features as input? Maybe I want to develop a github.io dashboard website like that you've sent. (But with more features.) Giving input to the dashboard is work of another person. Torvaney website is very simple and for example it doesn't have goalkeeper and player positions.