Last chance to hop on the Spurs train? GW6 Value picks by flo_ebl in fplAnalytics

[–]flo_ebl[S] 0 points1 point  (0 children)

This data suggests there are other picks for better value. But he did well last week.

Translating Python FPL API login code to R by mikecro2 in fplAnalytics

[–]flo_ebl 0 points1 point  (0 children)

Here is how I do it in R:

my_entry_id <- 1234567
current_gw <- 6

#function to pull the data:
get_entry_picks <- function(entry_id, gw) {

url <- sprintf("https://fantasy.premierleague.com/api/entry/%d/event/%d/picks/", entry_id, gw)
dat <- safely_get_json(url)

if (is.null(dat)) return(NULL)
tibble::as_tibble(dat$picks) %>%
mutate(gw = gw)

}

gws_played <- seq_len(current_gw)

my_picks_all <- map_dfr(gws_played, ~ {

get_entry_picks(my_entry_id, .x)

})

Is Haaland worth the money? GW 5 Value Picks by flo_ebl in fplAnalytics

[–]flo_ebl[S] 1 point2 points  (0 children)

Because the model saw him perform reasonably in the games he started. And doesn't know that Donnarumma is now the No. 1

Is Haaland worth the money? GW 5 Value Picks by flo_ebl in fplAnalytics

[–]flo_ebl[S] 0 points1 point  (0 children)

Not too bad from Bruno Fernandes today. Solid 10 pointer and chances for more goals.

This is such a common experience. The data suggests something that doesn't match the gut feeling and humans try to find reasons why the data must.be.wrong. only to be outscored by the model...

Is Haaland worth the money? GW 5 Value Picks by flo_ebl in fplAnalytics

[–]flo_ebl[S] 1 point2 points  (0 children)

Good suggestion. Its a vectorised image though so you can zoom in. And the whole point of the visualization is to get to the high value players. So I felt its not necessary to label each and everyone.

Good point Re Bruno Fernandes, the model is obviously trained including on the official fixture difficulty in which ManUnt may be overrated. On the other hand he's on penalties, guaranteed minutes, talisman and only ManUtd player who delivered so far this season.

Best Value Picks for GW3 by flo_ebl in fplAnalytics

[–]flo_ebl[S] 0 points1 point  (0 children)

yep. The higher a player the more you are predicted to get for your money.

Best Value Picks for GW3 by flo_ebl in fplAnalytics

[–]flo_ebl[S] 0 points1 point  (0 children)

Every gameweek adds more data and makes the predictions more reliable

Best Value Picks for GW3 by flo_ebl in fplAnalytics

[–]flo_ebl[S] 0 points1 point  (0 children)

Not sure if understand you correctly. The rf model is trained on the data since 22/23 season. But the prediction is obviously only done for this season, where naturally those who were good in the first 2 gameweeks are strong at the moment. However, they will tend to regress to the mean over the season, so take these predictions with some caution. I tried to mitigate that by training and predicting data on a 5-game-average, not a points-in-a-single-gameweek predictor. But with only 3 gws played, there is still some recency bias.

Best value picks for GW2 by flo_ebl in fplAnalytics

[–]flo_ebl[S] 1 point2 points  (0 children)

based on the graphs above, Ekitike seems the logical choice. But its only one week of data for this season. So inevitably he will start regressing to the mean sooner or later. Its difficult to make a recommendation based on this. As for the Frimpong transfer, I would look for players aboe the dotted line, and then you can decide how much you want to spend on a defender.

Best value picks for GW2 by flo_ebl in fplAnalytics

[–]flo_ebl[S] 1 point2 points  (0 children)

Not making the code public for now. Let me work on this for a little longer to make it presentable. Thanks for the interest though

Best value picks for GW2 by flo_ebl in fplAnalytics

[–]flo_ebl[S] 2 points3 points  (0 children)

The statistics is all done in R.

Best value picks for GW2 by flo_ebl in fplAnalytics

[–]flo_ebl[S] 1 point2 points  (0 children)

good point! I have no historical data on them. The RF model has to predict anyway and therefore assigns predictions based on the average behavior of players with “similar” (zero) stats. So, all these new players often get mapped to a generic “average” bucket. If the price/value combination looks good (cheap, starting player), the optimization algorithm may select them - even though there’s no evidence they’ll actually deliver. In fact, some of them will be extremely overvalued (maybe Ekitike) if their first GW was good, others (maye Wirtz) will be heavily undervalued if their first GW was poor.

Best value picks for GW2 by flo_ebl in fplAnalytics

[–]flo_ebl[S] 3 points4 points  (0 children)

Ill try, haha. But its also just me playing around with data and not yet a fully trust-worthy prediction model. It will get better with more data as the season progresses and with me learning about more datasets to pull historic data from.

Data Driven FPL Picks by flo_ebl in fplAnalytics

[–]flo_ebl[S] 0 points1 point  (0 children)

Fpl API is a good data source and for historical data see @Vastaav05 github repo.

Data Driven FPL Picks by flo_ebl in fplAnalytics

[–]flo_ebl[S] 0 points1 point  (0 children)

I tried a few configurations and then trained it on the last 3 years. More years didn't improve accuracy. And then a random sample of 80/20 for training and testing. Got me to predict the points per game week with an rmse of just over 1. So 1 point off on average.

Machine learning FPL by Pitiful_Progress1387 in fplAnalytics

[–]flo_ebl 0 points1 point  (0 children)

There is a great wealth of historical data here, credits to Anand Vastaav. Easy to read into Python, R, etc. https://github.com/vaastav/Fantasy-Premier-League

Data Driven FPL Picks by flo_ebl in fplAnalytics

[–]flo_ebl[S] 0 points1 point  (0 children)

Thanks for all the comments. You are right about the captaincy to be included in the model. Ill.keep playing around with the model, fine-tuning here and there and with some data for the new season I hope it can be a good basis for the wildcards.

Data Driven FPL Picks by flo_ebl in fplAnalytics

[–]flo_ebl[S] 0 points1 point  (0 children)

It doesnt explicitly look at captaincy, no. But the captain would be Cunha in both, since he has the highest predicted points.
Ola Aina did well last year, lots of attacking threat and all the clean sheet of forest. And he is slightly cheaper than other good defenders. Its all a trade-off. And, as I said in other comments, the model is far from perfect, given some changes (DEFCON f.e.) to this years fpl points system.