Coder Social home page Coder Social logo

nba-dfs-tools's People

Contributors

bjungwirth avatar chanzer0 avatar rm1tc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nba-dfs-tools's Issues

speed up randomness sampling

self.problem += plp.lpSum(np.random.normal(self.player_dict[player]['Fpts'],
(self.player_dict[player]['StdDev'] * self.randomness_amount / 100))

i think we should pull np.random.normal() out of the lpSum constraint and instead include as a value in player_dict a pre-sampled array of length n lineups like:

player_dict[player]['fp_array'] = np.random.normal(self.player_dict[player]['Fpts'],
((self.player_dict[player]['StdDev']/self.player_dict[player]['Fpts'], size=num_lineups)

then under line 157 in the opto we would do

    self.problem += plp.lpSum([p['fp_array'][i] for p in player_dict] * self.randomness_amount / 100)) 

(or whatever the correct syntax would be)

GPP Process

Hey, really cool code you have here? How exactly does your GPP process work like? I see from a quick glance that you essentially modify the optimal lineup? Is there any way I could reach out with more questions such as Twitter?

No module named 'nfl_optimizer'

Hello! Great work on this, has been fun to play with so far! However ran into issues with

image

Im assuming because of import nfl_optimizer within import.py but removing that fixes.

File Not Found Error

Not sure what I am doing wrong...any ideas?

PS C:\Users\erose\Downloads\NBA-DFS-Tools-master\NBA-DFS-Tools-master\src> python .\main.py dk opto 1 1
Traceback (most recent call last):
File "C:\Users\erose\Downloads\NBA-DFS-Tools-master\NBA-DFS-Tools-master\src\main.py", line 70, in
main(sys.argv)
File "C:\Users\erose\Downloads\NBA-DFS-Tools-master\NBA-DFS-Tools-master\src\main.py", line 28, in main
opto = NBA_Optimizer(site, num_lineups, num_uniques)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\erose\Downloads\NBA-DFS-Tools-master\NBA-DFS-Tools-master\src\nba_optimizer.py", line 41, in init
self.load_projections(projection_path)
File "C:\Users\erose\Downloads\NBA-DFS-Tools-master\NBA-DFS-Tools-master\src\nba_optimizer.py", line 108, in load_projections
with open(path) as file:
^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\erose\Downloads\NBA-DFS-Tools-master\NBA-DFS-Tools-master\src\../dk_data/projections.csv'
PS C:\Users\erose\Downloads\NBA-DFS-Tools-master\NBA-DFS-Tools-master\src>

"GameTime" KeyError with new Swaptimizer code

Are there any other changes that need to be made for the updated Swaptimizer to function properly?

Getting the following error when running it and have not changed any other files aside from the Swaptimizer and Opto from latest branch

gametime keyerror

Not an issue just a dummy

Hey Chanzer, I love the idea of your tools and I am a huge DFS fan whos been looking for a tool like this, specifically the excel sheet that shows optimal, top 10% win% etc, However I keep getting an error when I am trying to run optimal lineups to receive outputs that show those stats. The following message keeps occurring : PS C:\Users\colin\OneDrive\Desktop\NBA-DFS-Tools-master\src> python .\main.py dk opto 1000 0 rand
Traceback (most recent call last):
File "C:\Users\colin\OneDrive\Desktop\NBA-DFS-Tools-master\src\main.py", line 63, in
main(sys.argv)
File "C:\Users\colin\OneDrive\Desktop\NBA-DFS-Tools-master\src\main.py", line 21, in main
opto = NBA_Optimizer(site, num_lineups, num_uniques)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\colin\OneDrive\Desktop\NBA-DFS-Tools-master\src\nba_optimizer.py", line 36, in init
self.load_config()
File "C:\Users\colin\OneDrive\Desktop\NBA-DFS-Tools-master\src\nba_optimizer.py", line 60, in load_config
with open(os.path.join(os.path.dirname(file), '../config.json'), encoding='utf-8-sig') as json_file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\colin\OneDrive\Desktop\NBA-DFS-Tools-master\src\../config.json'
PS C:\Users\colin\OneDrive\Desktop\NBA-DFS-Tools-master\src>

Is there an issue with my JSON file? And would there be a code I could input that would allow for me to input my lineups, and receive the output in the excel sheet? Sorry if all of these questions are ridiculous but thank you so much for all you do!

Questions

Have you thought about expanding to all sports, and creating a GUI.

Also, I think it would be cool to have a db of FanDuel contest history. To see what top players are doing day to day. I know fantasy cruncher has rewind for DK, but nothing for FD since they done make csv’s of contests available. So you will need to scrape contest data from FD. I think this could be huge. If you want help let me know I started attempting this but it def needs upgrades.

Not Creating Set amount of Lineups.

Sorry, another issue i am having is i set the Opto lineups to 500 and it creates about 12-40 each time
image

image

I followed your video and instructions i thought very well. Not sure exactly what's going on.

Hyphenated Name in FD

Love your simulator but it seems like you have a bug with hyphenated players in FD (Luwawu-Cabarrot and Anthony-Towns tonight for example). It optimizes with them but includes them as zeroes across the board except for 0.1% for ownership.

Tourney Lineup Issue

Hi,

I'm a FD player and had some questions about the gpp sim process.

  1. I should run the opto first to generate a set # of lineups then run those against the contest im in to see optimal outcomes correct?
  2. I cant seem to gather the contest structure for FD is it the same csv structure for DK? Any way to automate that process?
  3. What is the process for running a large ggp tourney? For example the field size for a 0.05 contest is over 200,000 with a max of 150 entries. does having premade lineups speed up the process of calculating those numbers?

I appreciate your time in responding! Awesome tool.

Question

Where do you get the player data needed in CSV on fanduel?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.