https://github.com/rnhttr/dfs_mlb
https://github.com/rnhttr/dfs_mlb
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/rnhttr/dfs_mlb
- Owner: RNHTTR
- Created: 2018-02-23T00:17:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-16T13:16:48.000Z (about 8 years ago)
- Last Synced: 2025-02-09T00:25:29.977Z (over 1 year ago)
- Language: Python
- Size: 29.2 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A Machine Learning Approach to Daily Fantasy Baseball
Baseball (and thus fantasy baseball) generates large amounts of data on its players. This data can be harnessed to generate predictions about a given player's performance, which can in turn be used as an advantage in selecting a fantasy baseball team on DraftKings, FanDuel, or other fantasy sports site.
Predicting a player's value is not enough, though. Each player is given a dollar value associated with them. The total value of a team (the sum of the value of each players on a team) cannot be exceeded, so one most strive to get the most valuable team while not exceeding this artificial "salary cap". Additionally, one must player a certain number of players at a particular position (e.g. three outfielders, two pitchers, and so on). This requires a modified implementation of the knapsack algorithm to select the best team satisfying the salary cap and positional parameters.
So, this application strives to predict players' fantasy points as well as select the best (or near-best) team given a salary cap and positional requirements.
## Implementation
### Get the Data
Shout out to rotoguru1.com. Run GetData.py to store the player data in a csv file.
```
cd data
python GetData.py
```
### Format the Data
Edit data/FormatData.py to get a subset of the raw data that you intend to pass through the Neural Network. Then run FormatData.py to generate a csv file with formatted data.
```
cd data
python FormatData.py
```
### Data Playground
Not sure exactly how this will go yet!
### Run the Neural Network
From the root directory, run DenseNeuralNetwork.py
```
python DenseNeuralNetwork.py
```
## Authors
* **Ryan Hatter** - *Not for Reuse*
## Acknowledgments
* Hat tip to rotoguru1.com for the great data.