pydfs-lineup-optimizer icon indicating copy to clipboard operation
pydfs-lineup-optimizer copied to clipboard

PGA Optimization Testing

Open asardinha opened this issue 5 years ago • 2 comments

I have a theory that I'd like to test out related to PGA. Instead of simply optimizing by FP, what if there exist an option to optimize by finish probability.

My initial though is that simply plugging finish probablities into the fantasy points column, would not necessarily maximize the optimization, and simply using the input as a replacement for P/$ (value).

For example, after making columns for the percent chance a player: Make Cut, Top 20, Top 10, Top 5, Win, you can call the optimizer to use whichever column you'd like to maximize.

Any ideas on how we might be able to achieve this?

asardinha avatar Nov 25 '20 13:11 asardinha

So to see the optimals for each of those probabilty types, it would look something like the following:

n_lineups = ...
optimizer = get_optimizer(...)
prob_types = ('Make Cut', 'Top 20', 'Top 10', 'Top 5', 'Win')
for prob_type in prob_types:
    players = []
    for item in mydata:
        players.append(Player(...substitute probability or some other measure for fppg when creating Player object ...))
    optimizer.load_players(players)
    for lineup in optimizer.optimize(n_lineups):
        print(lineup)

sansbacon avatar Nov 25 '20 22:11 sansbacon

Thanks, @sansbacon.

I assume that we would have add columns from the csv to call for:

players.append(Player(...substitute probability or some other measure for fppg when creating Player object ...))

For example

players.append(Player(Win))

asardinha avatar Nov 25 '20 23:11 asardinha