alan-turing-institute / AIrsenal

Machine learning Fantasy Premier League team
MIT License
287 stars 86 forks source link

Accounting for players switching clubs #234

Open Hughesy opened 4 years ago

Hughesy commented 4 years ago

After a bit of playing around with the project, I realised that it doesn't detect players who have switched from one Premier League side to another e.g. Willian from Chelsea to Arsenal. The AI doesn't give a prediction as to how many points he can score, when you run airsenal_run_prediction --weeks_ahead 3. Not sure how to fix this, but thought it was worth mentioning.

jack89roberts commented 4 years ago

Hi @Hughesy , yes at the moment we take the conservative approach and don't predict points for new players, or players who have moved clubs (as we don't know what role they will have for their new team). You will start to get predictions for them after GW1. This is something we're interested in improving though.

It's quite a challenging problem - Dean Henderson, for example, will probably play much less this season after returning to Man Utd. Willian may get a similar amount of minutes to last season at Arsenal. Other players may get a lot more minutes (e.g. young players at big clubs going on loan). Capturing all the different possibilities in the model won't be straightforward.

jack89roberts commented 4 years ago

An interesting thing to investigate would be the difference in minutes played (at old club vs. new club) compared to the difference in the strength of the old club and new club (thinking that players moving to stronger clubs will probably play less than before, and the opposite for players moving to weaker clubs).

Hughesy commented 4 years ago

Yes I agree, definitely a challenging problem to think about. I assume you can get a prediction based on a players previous stats, if they hypothetically played similar mins and the same position? If so, can you look back at previous seasons for transfered players and look at how they performed, based on age, type of transfer (could be hard to find data for) and Club strength? You can then apply a 'multiplier' to the predicted points for this season.

jack89roberts commented 4 years ago

At the moment the model does assume that, when on the pitch, the player will perform the same for his new team in terms of the fraction of the team's goals he's involved in. So if Willian was historically involved in 15% of Chelsea's goals (not the actual number, just made that up) when he was playing, it will predict his points for Arsenal assuming he'll be involved in 15% of their goals (again, when on the pitch).

The bit we don't assume is the minutes he'll play. So a couple of weeks into the season, for example, Willian will get points predictions based on Arsenal's strength as a team (across the last 3 seasons), Willian's goal contributions (across the last 3 seasons, so mostly for Chelsea), and his recent minutes played (in the last 3 matches, so for Arsenal).

This is definitely something we'd like to improve and explore though (and any suggestions/contributions welcome)!