Skip to content

Instantly share code, notes, and snippets.

@daveklotz
daveklotz / results.txt
Created July 31, 2021 20:26
Results of Back Testing from 2021, 2018 and 2017
2021 through July 27th
======================
+-------------+-----------+----------+------------+------------+
| Certainty | NumBets | Stake | Winnings | ROI |
|-------------+-----------+----------+------------+------------|
| Pr > 0.0 | 1395 | 162761 | 1366 | 0.00839267 |
| Pr > 0.05 | 439 | 48121 | 4786 | 0.0994576 |
| Pr > 0.10 | 125 | 13991 | 1503 | 0.107426 |
| Pr > 0.15 | 64 | 7294 | 226 | 0.0309844 |
@daveklotz
daveklotz / daily-sheet-generation.py
Created July 31, 2021 19:48
Generate the data and run the ANN so I can get picks for today's games
######
# NOTE: this includes calculaiton for my first Wins Above Replacement approach, as well as the current DRA- approach
######
games = mlbgame.day(2021,7,30)
daily_game_id = 1
unique_row_id = 1. # just to make sure i have the same format as legacy spreadsheet
location_index = 0
@daveklotz
daveklotz / baseballann-draminus.ipynb
Created July 31, 2021 19:35
BaseballANN-DRAminus.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@daveklotz
daveklotz / ann-building.py
Created July 31, 2021 19:32
Configuration for DRA- Based ANN
units = 10
ann = tf.keras.models.Sequential()
ann.add(tf.keras.layers.Dense(units=units, activation='sigmoid'))
ann.add(tf.keras.layers.Dense(units=units, activation='sigmoid'))
ann.add(tf.keras.layers.Dense(units=units, activation='sigmoid'))
ann.add(tf.keras.layers.Dense(units=1, activation='sigmoid'))
ann.compile(optimizer = 'adam', loss = 'binary_crossentropy', metrics = ['accuracy'])