Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using xG instead of goals #4

Open
goktugerce opened this issue May 30, 2024 · 2 comments
Open

Using xG instead of goals #4

goktugerce opened this issue May 30, 2024 · 2 comments

Comments

@goktugerce
Copy link

Since Dixon-Coles model uses Poisson distribution I guess it is not possible (or easy) to use xG values instead of actual goals to train the model. I tried multiplying xG values by 100 and then rounding, and it gave team strengths just fine (I guess) but simulating the games did not work correctly (the outcomes become 0).

Just wanted to learn if it is possible to somehow integrate xG into this. I came across your Dixon Coles and xG: together at last blog post and it suggests we can incorporate xG simulations into this by "tricking" the model. Personally I could not come up with a way to do it in Python (mainly because I did not understand what to pass as weights parameter).

Some help is appreciated if you are still maintaining this.

@goktugerce
Copy link
Author

After giving it a better read, I understood that it's not only about the parameters but also about the data points we pass to the model. We will not have 380 games for an EPL season but have -let's say- 36 rows for each game with assigned probabilities.

I will give this a shot tomorrow, hopefully I can also integrate time-based weighting into this. Will keep this space updated.

@Torvaney
Copy link
Owner

Yes, exactly; you can see an example project using this method with this package here: https://github.com/Torvaney/wingback/blob/master/wingback/team_strength.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants