Skip to content

mmaher22/FantasyPremierLeagueTeamRecommender

Repository files navigation

Team Recommendation System for Fantasy Premier League:


Fantasy Premier League (fantasy.premierleague.com) is also the most popular fantasy soccer game , with more than 5 million users, in the soccer world. Get your fantasy season started by drafting players to build a solid team and using coaching tips to keep your team going strong. Every week, Fantasy Premier League users are competing to choose their team of players based on different criteria. The success of your fantasy football team hinges on your picks, and there is a different strategy to pick your draft. The main target is to minimize risk, maximize gain, and make the tough decisions when it comes to fantasy football draft day to chose the most useful team at the start of any league to get a high score.

The aim of this project is to:

  1. Extract features that can be used to predict player performance each game week from available datasets on Kaggle, and Fantasy API.
  2. Use different Machine Learning and Deep Learning algorithms to build a model that can predict player points each week. Recommend a team line-up based on the results of the model that can achieves total score exceeding fantasy users scores consistently.

Available Data URL:

./Raw Data

We used data for seasons 2016\2017, 2017\2018, and current season 2018\2019 till the 8th week. As the current data is only considered as records for each game week, we need to make use of this data to find suitable features that can help in predicting the player performance in following week.

Extracted Data URL:

./Extracted Data

./Feature Extraction/Players_Feature_Extractors.py

Each instance in the extracted dataset represents player information for a certain game week. This information includes: 1) Statistics of player performance in the past game weeks of the same season. 2) Team of the player past results and performance during last game weeks of same season. 3) Opponent Team of the player past results and performance during last game weeks of same season

Building Regression Model URL:

./Model Building

Different Regression Algorithms are tried out on the dataset with tuned parameters using Grid Search with CV = 5

Team Formation URL

./Team Formation

To Start forming a team-lineup based on the model predictions. We need to handle some constraints from Fantasy Game Rules:

  1. Team Budget should be less than 100 units. (We made our budget 85 units for 11 players without substitutions)
  2. We can’t choose more than 3 players from the same team.
  3. We should use one of the following formations (3-4-3 / 3-5-2 / 4-4-2 / 4-3-3 / 4-5-1).
  4. Score of Captain player selected is doubled.

Based on our analysis on dataset, average forwards players points are the highest, followed by midfielders, and defenders. So, we fixed 3-4-3 formation as our chosen formation for team-lineup selection but you can find results of all other formations here:

./Team Formation/TeamFormation_Example.py

Results:

Comparison between average scores by fantasy users and our model:

Examples of Chosen Team:

Future Work:

As a future work, we suggest to:

  1. Try more different features about either team, or player performance history.
  2. Include more information about player injury state.
  3. Add features about match importance to each team, and which team is the home team and which one is the away team.
  4. Use more seasons data in training can improve the model performance.

About

Team Recommendation System for Fantasy Premier League

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published