DimaKudosh / pydfs-lineup-optimizer

Daily Fantasy Sports lineup optimzer for all popular daily fantasy sports sites
MIT License
424 stars 157 forks source link

Min/Max exposure #215

Open will6809 opened 4 years ago

will6809 commented 4 years ago

Questions about min/max. Do i add the to my csv This is my code im using, how would i use the min/max exposures in this code

from pydfs_lineup_optimizer import get_optimizer, Site, Sport, CSVLineupExporter from pydfs_lineup_optimizer.stacks import TeamStack, PositionsStack, PlayersGroup from pydfs_lineup_optimizer import AfterEachExposureStrategy

file = 'lineups.csv' optimizer = get_optimizer(Site.FANDUEL, Sport.FOOTBALL) optimizer.load_players_from_csv('will.csv') optimizer.set_deviation(0.4, 0.12) optimizer.add_stack(TeamStack(2, for_positions=['QB', 'WR'])) optimizer.force_positions_for_opposing_team(('QB', 'WR')) lineups = optimizer.optimize(40 , max_exposure=0.50 , exposure_strategy=AfterEachExposureStrategy)

exporter = CSVLineupExporter(lineups) exporter.export(file) optimizer.print_statistic()

Thanks

Denwen12 commented 4 years ago

what code?

On Mon, Oct 26, 2020, 7:03 PM will6809 notifications@github.com wrote:

Questions about min/max. Do i add the to my csv This is my code im using, how would i use the min/max exposures in this code

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DimaKudosh/pydfs-lineup-optimizer/issues/215, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANBWO7TDHOFOSBWPORJ24TDSMX557ANCNFSM4TAAZ5OA .

will6809 commented 4 years ago

Code is in post. Just need to know how to setup min/max exposures in csv file. What line of code to run it. Thanks

Denwen12 commented 3 years ago

you just use min exposure and max exposure for columns