Update app.py
Browse files
app.py
CHANGED
@@ -67,10 +67,11 @@ def init_baselines():
|
|
67 |
raw_display = raw_display[1:]
|
68 |
raw_display = raw_display.reset_index(drop=True)
|
69 |
raw_display.replace('', np.nan, inplace=True)
|
|
|
70 |
game_model = raw_display[['#', 'date', 'gameid', 'HomeTeam', 'HomeDiv', 'HomeConf', 'AwayTeam', 'AwayDiv', 'AwayConf',
|
71 |
'total', 'mlHome', 'mlAway', 'spreadHome', 'spreadAway', 'booksid', 'inconf', 'Neutral', 'Home Team PM',
|
72 |
'Road Team PM', 'HCA', 'Home Team Margin', 'Home Team Win', 'Home ML Break Even %',
|
73 |
-
'Road ML Break Even %', 'Home Win Edge', 'Road Win Edge', 'Moneyline Bet Rec', 'Home Spread Edge',
|
74 |
'Road Team Edge', 'Home Spread HKelly', 'Away Spread HKelly', 'Spread Bet Rec', 'Edge for Spread']]
|
75 |
data_cols = ['#', 'gameid', 'total', 'mlHome', 'mlAway', 'spreadHome', 'spreadAway', 'Neutral', 'Home Team PM',
|
76 |
'Road Team PM', 'HCA', 'Home Team Margin', 'Home Team Win', 'Home ML Break Even %',
|
@@ -79,7 +80,7 @@ def init_baselines():
|
|
79 |
game_model[data_cols] = game_model[data_cols].apply(pd.to_numeric, errors='coerce')
|
80 |
game_model = game_model[game_model['#'] != ""]
|
81 |
just_win_probs = game_model[['#', 'date', 'gameid', 'HomeTeam', 'AwayTeam', 'total', 'mlHome', 'mlAway', 'spreadHome', 'spreadAway', 'booksid',
|
82 |
-
'Moneyline Bet Rec', 'Spread Bet Rec']]
|
83 |
|
84 |
timestamp = raw_display['Time'].head(1)[0]
|
85 |
|
|
|
67 |
raw_display = raw_display[1:]
|
68 |
raw_display = raw_display.reset_index(drop=True)
|
69 |
raw_display.replace('', np.nan, inplace=True)
|
70 |
+
raw_display['Edge for Moneyline'] = np.where(raw_display['Home Win Edge'] > raw_display['Road Win Edge'], raw_display['Home Win Edge'], raw_display['Road Win Edge'])
|
71 |
game_model = raw_display[['#', 'date', 'gameid', 'HomeTeam', 'HomeDiv', 'HomeConf', 'AwayTeam', 'AwayDiv', 'AwayConf',
|
72 |
'total', 'mlHome', 'mlAway', 'spreadHome', 'spreadAway', 'booksid', 'inconf', 'Neutral', 'Home Team PM',
|
73 |
'Road Team PM', 'HCA', 'Home Team Margin', 'Home Team Win', 'Home ML Break Even %',
|
74 |
+
'Road ML Break Even %', 'Home Win Edge', 'Road Win Edge', 'Moneyline Bet Rec', 'Edge for Moneyline', 'Home Spread Edge',
|
75 |
'Road Team Edge', 'Home Spread HKelly', 'Away Spread HKelly', 'Spread Bet Rec', 'Edge for Spread']]
|
76 |
data_cols = ['#', 'gameid', 'total', 'mlHome', 'mlAway', 'spreadHome', 'spreadAway', 'Neutral', 'Home Team PM',
|
77 |
'Road Team PM', 'HCA', 'Home Team Margin', 'Home Team Win', 'Home ML Break Even %',
|
|
|
80 |
game_model[data_cols] = game_model[data_cols].apply(pd.to_numeric, errors='coerce')
|
81 |
game_model = game_model[game_model['#'] != ""]
|
82 |
just_win_probs = game_model[['#', 'date', 'gameid', 'HomeTeam', 'AwayTeam', 'total', 'mlHome', 'mlAway', 'spreadHome', 'spreadAway', 'booksid',
|
83 |
+
'Moneyline Bet Rec', 'Edge for Moneyline', 'Spread Bet Rec', 'Edge for Spread']]
|
84 |
|
85 |
timestamp = raw_display['Time'].head(1)[0]
|
86 |
|