BEGIN TYPING YOUR SEARCH ABOVE AND PRESS RETURN TO SEARCH. PRESS ESC TO CANCEL

Fantasy Premier League Algorithm – Week 7

I’ve joined the Fantasy Premier League this season. It’s going pretty good so far, but I wanted to come up with a surefire way of beating my mates this weekend. (There’s a few pints of beer up for grabs after all).

Discuss on RedditHacker News

I’ve spent the last couple of hours writing a Python script that scrapes a few websites to extract player data to determine which players in the English Premier League are more likely to score high points this weekend. Note: The results shown here only predict this weekends games – the results can/will be massively different next week.

Code

You can find the code and try it out yourself on my Github Account

The algorithm assesses the players using these statistics and variables (October 4th and 5th):

  • EA Sports Player Performance Index
  • The quality of their next opposition (Ranked from 1 – 20)
  • Whether or not their next game is at home or away (PPI sees an average drop of 15% for away games)
  • Average home PPI
  • Average away PPI

Results

I’ll show you 3 things:

  • The team that my program has picked
  • This weeks fixtures
  • This weeks player predictions table

This Weeks Team

The final team that the program output suggests (at a total cost of £72.2 million – Not including subs):

Fixtures

The fixtures for this weekend would suggest that Leicester and West Ham have a good chance…

Gameweek 7 – 04 Oct 11:30
04 Oct 15:00 Hull Hull v Crystal Palace Crystal Palace
04 Oct 15:00 Leicester Leicester v Burnley Burnley
04 Oct 15:00 Liverpool Liverpool v West Brom West Brom
04 Oct 15:00 Sunderland Sunderland v Stoke Stoke
04 Oct 15:00 Swansea Swansea v Newcastle Newcastle
04 Oct 17:30 Aston Villa Aston Villa v Man City Man City
05 Oct 12:00 Man Utd Man Utd v Everton Everton
05 Oct 14:05 Chelsea Chelsea v Arsenal Arsenal
05 Oct 14:05 Spurs Spurs v Southampton Southampton
05 Oct 16:15 West Ham West Ham v QPR QPR

This Weeks Algorithm Output

The results of the algorithm suggest that Leicester and West Ham players will do well. Here’s the results for this week (Week 7) (4th and 5th of October):

Player Name Club Position Prediction
Diego Costa Chelsea Forward 97.2
Leonardo Ulloa Leicester City Forward 83.95
Gylfi Sigurdsson Swansea City Midfielder 78.6
Stewart Downing West Ham United Midfielder 76.5
Diafra Sakho West Ham United Forward 75.85
Jamie Vardy Leicester City Forward 74.25
Esteban Cambiasso Leicester City Midfielder 73.65
Raheem Sterling Liverpool Midfielder 72.4
Mark Noble West Ham United Midfielder 71.8
Daniel Sturridge Liverpool Forward 70.15
Nathan Dyer Swansea City Midfielder 67.8
Mauro Zrate West Ham United Forward 67.45
Eden Hazard Chelsea Midfielder 62.5
Morgan Amalfitano West Ham United Midfielder 61.1
Cesc Fbregas Chelsea Midfielder 60.2
Graziano Pell Southampton Forward 58.65
Ritchie de Laet Leicester City Defender 58.4
David Nugent Leicester City Forward 58.25
Sergio Agero Manchester City Forward 58.2
Morgan Schneiderlin Southampton Midfielder 58.15
Wes Morgan Leicester City Defender 57.1
Jonjo Shelvey Swansea City Midfielder 56.8
Aaron Cresswell West Ham United Defender 56.75
Jordi Amat Swansea City Defender 56.55
Ander Herrera Manchester United Midfielder 56.15
Cheikhou Kouyat West Ham United Midfielder 56.1
Ashley Williams Swansea City Defender 56.1
Wilfried Zaha Crystal Palace Midfielder 55.75
Enner Valencia West Ham United Forward 55.7
Ki Sung-Yueng Swansea City Midfielder 54.95
Dusan Tadic Southampton Midfielder 54.8
Paul Konchesky Leicester City Defender 54.8
Steven Gerrard Liverpool Midfielder 54.75
Winston Reid West Ham United Defender 54.75
David Silva Manchester City Midfielder 54.65
Chris Wood Leicester City Forward 54.0
Victor Moses Stoke City Midfielder 53.85
Wayne Rooney Manchester United Forward 53.8
Adam Johnson Sunderland Midfielder 53.5
Wilfried Bony Swansea City Forward 53.4
Ricardo Vaz Te West Ham United Forward 53.1
James Morrison West Bromwich Albion Midfielder 53.05
Abel Hernndez Hull City Forward 52.8
ngel Di Mara Manchester United Midfielder 52.3
Angel Rangel Swansea City Defender 52.25
Sebastian Larsson Sunderland Midfielder 52.15
Jordan Henderson Liverpool Midfielder 52.05
Neil Taylor Swansea City Defender 51.8
Lukasz Fabianski Swansea City Goalkeeper 51.8
Saido Berahino West Bromwich Albion Forward 51.6
James Chester Hull City Defender 51.55
Robin van Persie Manchester United Forward 51.45
Jack Rodwell Sunderland Midfielder 51.3
Wayne Routledge Swansea City Midfielder 51.1
Riyad Mahrez Leicester City Midfielder 50.8
Branislav Ivanovic Chelsea Defender 49.7
Liam Moore Leicester City Defender 49.65
Kasper Schmeichel Leicester City Goalkeeper 49.65
Adrin West Ham United Goalkeeper 49.0
Ben Hamer Leicester City Goalkeeper 49.0
Jason Puncheon Crystal Palace Midfielder 48.85
Joey O’Brien West Ham United Defender 48.4
Samir Nasri Manchester City Midfielder 48.3
Dean Hammond Leicester City Midfielder 47.5
Alexandre Song West Ham United Midfielder 47.45
Nemanja Matic Chelsea Midfielder 47.4
Ryan Shawcross Stoke City Defender 47.35
Ryan Bertrand Southampton Defender 47.1
Mile Jedinak Crystal Palace Midfielder 47.0
Stevan Jovetic Manchester City Forward 46.95
Oscar Chelsea Midfielder 46.9
Carlton Cole West Ham United Forward 46.5
Joleon Lescott West Bromwich Albion Defender 46.3
Jonny Evans Manchester United Defender 45.9
Nikica Jelavic Hull City Forward 45.8
Nacer Chadli Tottenham Hotspur Midfielder 45.55
Wes Brown Sunderland Defender 45.3
Willian Chelsea Midfielder 45.2
Gal Clichy Manchester City Defender 45.15
Daniel Drinkwater Leicester City Midfielder 44.75
Guy Demel West Ham United Defender 44.55
James Milner Manchester City Midfielder 44.4
Rafael Manchester United Defender 44.15
Daley Blind Manchester United Midfielder 44.0
Edin Dzeko Manchester City Forward 43.85
Fernando Manchester City Midfielder 43.35
Andy King Leicester City Midfielder 43.35
James Tomkins West Ham United Defender 43.15
Nathaniel Clyne Southampton Defender 43.05
Phil Bardsley Stoke City Defender 43.05
Jeffrey Schlupp Leicester City Defender 42.75
Michael Dawson Hull City Defender 42.55
James McArthur Crystal Palace Midfielder 42.5
Frank Lampard Manchester City Midfielder 42.45
Graham Dorrans West Bromwich Albion Midfielder 42.4
Lucas Leiva Liverpool Midfielder 42.2
Santiago Vergini Sunderland Defender 42.0
Juan Mata Manchester United Midfielder 41.85
Javier Manquillo Liverpool Defender 41.45
Mamadou Sakho Liverpool Defender 41.3
Lee Cattermole Sunderland Midfielder 41.25
Pablo Zabaleta Manchester City Defender 40.95
Csar Azpilicueta Chelsea Defender 40.85
Gary Cahill Chelsea Defender 40.7
Vito Mannone Sunderland Goalkeeper 40.7
Mario Balotelli Liverpool Forward 40.55
Andreas Weimann Aston Villa Forward 40.2
Papiss Demba Ciss Newcastle United Forward 40.15
Romelu Lukaku Everton Forward 39.9
Glenn Whelan Stoke City Midfielder 39.35
Martn Demichelis Manchester City Defender 39.35
Tom Huddlestone Hull City Midfielder 39.25
Alberto Moreno Liverpool Defender 39.1
Sadio Man Southampton Midfielder 39.05
Simon Mignolet Liverpool Goalkeeper 39.0
John Terry Chelsea Defender 38.95
Kevin Nolan West Ham United Midfielder 38.95
Eric Dier Tottenham Hotspur Defender 38.7
Craig Gardner West Bromwich Albion Midfielder 38.6
Steven Naismith Everton Forward 38.45
Mame Biram Diouf Stoke City Forward 38.4
Patrick van Aanholt Sunderland Defender 38.4
Yaya Tour Manchester City Midfielder 38.3
Marc Albrighton Leicester City Midfielder 38.15
Peter Crouch Stoke City Forward 38.1
Brede Hangeland Crystal Palace Defender 38.1
Emmanuel Adebayor Tottenham Hotspur Forward 38.1
Gabriel Agbonlahor Aston Villa Forward 37.9
Ramires Chelsea Midfielder 37.9
Federico Fernndez Swansea City Defender 37.9
Emanuele Giaccherini Sunderland Midfielder 37.8
John O’Shea Sunderland Defender 37.55
Joe Allen Liverpool Midfielder 37.4
Yannick Bolasie Crystal Palace Midfielder 37.2
Vincent Kompany Manchester City Defender 37.2
Jess Navas Manchester City Midfielder 37.1
Victor Wanyama Southampton Midfielder 36.9
Fraizer Campbell Crystal Palace Forward 36.75
Martin Kelly Crystal Palace Defender 36.75
Matthew James Leicester City Midfielder 36.6
Dejan Lovren Liverpool Defender 36.55
Ahmed Elmohamady Hull City Midfielder 36.5
Kieran Gibbs Arsenal Defender 36.5
Eliaquim Mangala Manchester City Defender 35.8
Leon Osman Everton Midfielder 35.75
Jefferson Montero Swansea City Midfielder 35.6
Andre Wisdom West Bromwich Albion Defender 35.5
David Jones Burnley Midfielder 35.5
Marc Wilson Stoke City Defender 35.5
Joe Ledley Crystal Palace Midfielder 35.45
Andr Schrrle Chelsea Midfielder 35.3
Mesut zil Arsenal Midfielder 35.2
Thibaut Courtois Chelsea Goalkeeper 35.1
Leighton Baines Everton Defender 34.6
Tom Ince Hull City Midfielder 34.6
Steven N’Zonzi Stoke City Midfielder 34.35
Sylvain Distin Everton Defender 34.35
Falcao Manchester United Forward 34.1
Jose Fonte Southampton Defender 34.05
Scott Dann Crystal Palace Defender 34.05
Aaron Ramsey Arsenal Midfielder 34.0
Phil Jones Manchester United Defender 33.95
Chris Brunt West Bromwich Albion Midfielder 33.8
Joe Hart Manchester City Goalkeeper 33.8
Baftimbi Gomis Swansea City Forward 33.75
Sbastien Pocognoli West Bromwich Albion Defender 33.65
Aleksandar Kolarov Manchester City Defender 33.65
Ashley Young Manchester United Midfielder 33.65
Niko Kranjcar Queens Park Rangers Midfielder 33.65
Craig Dawson West Bromwich Albion Defender 33.6
Danny Simpson Leicester City Defender 33.45
Erik Pieters Stoke City Defender 33.4
Steven Fletcher Sunderland Forward 33.35
Alexis Snchez Arsenal Forward 33.3
Connor Wickham Sunderland Forward 33.25
Mohamed Diam Hull City Midfielder 33.2
Martin Skrtel Liverpool Defender 33.15
Fraser Forster Southampton Goalkeeper 33.05
Carl Jenkinson West Ham United Defender 32.95
Adam Lallana Liverpool Midfielder 32.55
Robbie Brady Hull City Midfielder 32.5
Fabio Borini Liverpool Forward 32.5
Marouane Chamakh Crystal Palace Forward 32.35
James Ward-Prowse Southampton Midfielder 32.25
Ashley Westwood Aston Villa Midfielder 32.15
Asmir Begovic Stoke City Goalkeeper 32.1
Erik Lamela Tottenham Hotspur Midfielder 32.1
Christian Eriksen Tottenham Hotspur Midfielder 32.05
Andrew Robertson Hull City Defender 32.05
Willy Caballero Manchester City Goalkeeper 32.0
Dwight Tiendalli Swansea City Defender 32.0
Seamus Coleman Everton Defender 31.85
Philippe Coutinho Liverpool Midfielder 31.55
Glen Johnson Liverpool Defender 31.55
Jonathan Walters Stoke City Forward 31.5
Allan McGregor Hull City Goalkeeper 31.05
Alan Hutton Aston Villa Defender 31.0
Stephen Quinn Hull City Midfielder 30.9
Ben Foster West Bromwich Albion Goalkeeper 30.65
Charlie Austin Queens Park Rangers Forward 30.6
Ricardo lvarez Sunderland Midfielder 30.55
Joel Ward Crystal Palace Defender 30.5
Diego Poyet West Ham United Midfielder 30.5
Julian Speroni Crystal Palace Goalkeeper 30.35
Jordi Gmez Sunderland Midfielder 30.25
Kieran Trippier Burnley Defender 30.2
Marcos Rojo Manchester United Defender 30.0
Gary Taylor-Fletcher Leicester City Forward 30.0
Yaya Sanogo Arsenal Forward 29.95
Massadio Haidara Newcastle United Defender 29.95
Steven Davis Southampton Midfielder 29.9
Charlie Adam Stoke City Midfielder 29.8
Danny Rose Tottenham Hotspur Defender 29.65
Curtis Davies Hull City Defender 29.5
Tom Carroll Swansea City Midfielder 29.3
William Buckley Sunderland Midfielder 29.25
Jack Cork Southampton Midfielder 29.05
Phil Jagielka Everton Defender 28.95
Shane Long Southampton Forward 28.95
Paul McShane Hull City Defender 28.8
James McCarthy Everton Midfielder 28.65
Antonio Valencia Manchester United Midfielder 28.6
Billy Jones Sunderland Defender 28.25
Barry Bannan Crystal Palace Midfielder 28.15
Kevin Mirallas Everton Midfielder 28.05
Ron Vlaar Aston Villa Defender 28.0
Anthony Knockaert Leicester City Midfielder 27.7
Etienne Capoue Tottenham Hotspur Midfielder 27.65
David de Gea Manchester United Goalkeeper 27.65
Rickie Lambert Liverpool Forward 27.65
Youssuf Mulumbu West Bromwich Albion Midfielder 27.5
Dwight Gayle Crystal Palace Forward 27.4
Daryl Janmaat Newcastle United Defender 27.35
Leroy Fer Queens Park Rangers Midfielder 27.3
Philippe Senderos Aston Villa Defender 27.15
Liam Bridcutt Sunderland Midfielder 27.1
Ashley Richards Swansea City Defender 27.0
Marvin Emnes Swansea City Forward 27.0
Michael Williamson Newcastle United Defender 26.9
Damien Delaney Crystal Palace Defender 26.8
Jan Vertonghen Tottenham Hotspur Defender 26.65
Marc Muniesa Stoke City Defender 26.65
Jake Livermore Hull City Midfielder 26.6
Luke Shaw Manchester United Defender 26.25
James Collins West Ham United Defender 26.2
Scott Arfield Burnley Midfielder 26.05
Brad Guzan Aston Villa Goalkeeper 25.85
Stphane Sessegnon West Bromwich Albion Midfielder 25.8
Jonas Olsson West Bromwich Albion Defender 25.8
Jozy Altidore Sunderland Forward 25.8
Liam Rosenior Hull City Defender 25.8
Kieran Richardson Aston Villa Midfielder 25.7
Gareth Barry Everton Midfielder 25.5
Steven Caulker Queens Park Rangers Defender 25.45
Jack Wilshere Arsenal Midfielder 25.4
Yoan Gouffran Newcastle United Forward 25.2
Younes Kaboul Tottenham Hotspur Defender 25.05
Rmy Cabella Newcastle United Midfielder 25.05
Peter Odemwingie Stoke City Forward 25.0
John Stones Everton Defender 24.95
Michael Duff Burnley Defender 24.95
Maya Yoshida Southampton Defender 24.95
Jason Shackell Burnley Defender 24.8
Adrian Mariappa Crystal Palace Defender 24.8
Fernandinho Manchester City Midfielder 24.7
Clint Hill Queens Park Rangers Defender 24.6
Danny Welbeck Arsenal Forward 24.5
Bojan Stoke City Forward 24.4
Santiago Cazorla Arsenal Midfielder 24.35
Hugo Lloris Tottenham Hotspur Goalkeeper 24.35
Robert Green Queens Park Rangers Goalkeeper 24.35
Tyler Blackett Manchester United Defender 24.35
Nabil Bentaleb Tottenham Hotspur Midfielder 24.2
Eduardo Vargas Queens Park Rangers Forward 24.05
Ben Mee Burnley Defender 23.95
Mikel Arteta Arsenal Midfielder 23.95
Patrick McNair Manchester United Defender 23.95
Rio Ferdinand Queens Park Rangers Defender 23.8
Aly Cissokho Aston Villa Defender 23.7
Laurent Koscielny Arsenal Defender 23.45
Mauricio Isla Queens Park Rangers Defender 23.35
Matthew Taylor Burnley Midfielder 23.35
Cheick Tiot Newcastle United Midfielder 23.05
Dean Marney Burnley Midfielder 22.95
Fabian Delph Aston Villa Midfielder 22.85
Tom Heaton Burnley Goalkeeper 22.8
Mathieu Debuchy Arsenal Defender 22.75
Darren Fletcher Manchester United Midfielder 22.75
Tom Cleverley Aston Villa Midfielder 22.7
Marko Arnautovic Stoke City Forward 22.4
Jack Colback Newcastle United Midfielder 22.35
Lazar Markovic Liverpool Forward 22.35
Toby Alderweireld Southampton Defender 22.05
Alex Bruce Hull City Defender 22.0
Gastn Ramrez Hull City Midfielder 21.6
Moussa Sissoko Newcastle United Midfielder 20.95
Junior Hoilett Queens Park Rangers Midfielder 20.9
Joey Barton Queens Park Rangers Midfielder 20.8
Victor Anichebe West Bromwich Albion Forward 20.8
Andros Townsend Tottenham Hotspur Midfielder 20.75
Brown Ideye West Bromwich Albion Forward 20.7
Emre Can Liverpool Midfielder 20.5
Jos Enrique Liverpool Defender 20.5
Tim Howard Everton Goalkeeper 20.4
Siem de Jong Newcastle United Forward 20.1
Michael Keane Burnley Defender 20.0
Olivier Giroud Arsenal Forward 19.85
Chris Smalling Manchester United Defender 19.6
Vlad Chiriches Tottenham Hotspur Defender 19.6
Armand Traore Queens Park Rangers Defender 19.55
Stephen Ireland Stoke City Midfielder 19.55
Bacary Sagna Manchester City Defender 19.4
Wojciech Szczesny Arsenal Goalkeeper 19.35
Cristian Gamboa West Bromwich Albion Defender 19.25
Nacho Monreal Arsenal Defender 19.1
Florin Gardos Southampton Defender 19.0
Lukas Jutkiewicz Burnley Forward 18.95
Jordon Mutch Queens Park Rangers Midfielder 18.8
Oussama Assaidi Stoke City Midfielder 18.7
Per Mertesacker Arsenal Defender 18.65
George Boyd Burnley Midfielder 18.4
Georgios Samaras West Bromwich Albion Forward 18.25
Richard Dunne Queens Park Rangers Defender 18.1
Robert Snodgrass Hull City Midfielder 18.0
Tim Krul Newcastle United Goalkeeper 17.95
Steven Pienaar Everton Midfielder 17.85
Fabricio Coloccini Newcastle United Defender 17.8
Loc Remy Chelsea Forward 17.65
Vurnon Anita Newcastle United Midfielder 17.55
Aiden McGeady Everton Midfielder 17.4

5 Comments

  1. Thanks for posting this. I was getting some html parse errors so installed lxml and made a very minor tweaks to get it working again. Also added an main thing so that you can just do ‘python start.py 7’.

    • Hey Brandon, cheers mate! I attempted adding the if __name__ == "__main__": part to start.py but I kept getting error after error! Much easier your way! Thanks!

  2. lol, i just took 3 of the top3 players on this site into my ff team. lets see. if i fail i willfind u lol

  3. hi, thanx for share that info.
    from 2 years i thing about make algorythm for game we play in Poland, about Polish Football League.
    Basicly, i have info like The quality of their next opposition (Ranked from 1 – 16), next game is at home or away (checked point nad Polish game PPI drops similar to FPL an average of 15%-16% for away games), Average home PPI for all players, Average away PPI for all players.
    Any help how to create matemathic algoryth for this? Dont need help with code, its to complicated to me anyway, think more about excell ocument.
    Thanx.

Leave a comment

Please be polite. We appreciate that. Your email address will not be published and required fields are marked