dfs-with-r / coach

Lineup optimization for daily fantasy sports
https://dfs-with-r.github.io/coach/
GNU General Public License v3.0
46 stars 14 forks source link

Dk NBA exposure does not work. #37

Closed NahomKun closed 2 years ago

NahomKun commented 2 years ago

`dk <- dk %>% mutate( exposure = case_when( player == "Ja Morant" ~ .9, player == "Serge Ibaka" ~ .9, player == "LeBron James" ~ .9, player == "Obi Toppin" ~ .9, TRUE ~ .6 ) )

dkmod <- model_dk_nba(dk) lineups <-optimize_generic(dk, dkmod, L = 10, solver = "glpk", max_exposure = dk$exposure)`

when i run the above code on attached dataframe. And is there a way to lock specific players, meaning build a lineup around give core players? Thanks for making this package!! coachtest.csv