Spaces:
Running
Running
James McCool
commited on
Commit
·
d39b71d
1
Parent(s):
1acbaaa
Refactor app.py to simplify 'over_adj' and 'under_adj' calculations by removing the subtraction of 1 in the conditional logic. This change enhances the accuracy of player projections by directly using the ratio of 'Mean_Outcome' to 'Prop', ensuring a more reliable analysis of prop outcomes.
Browse files
app.py
CHANGED
@@ -288,8 +288,8 @@ with tab3:
|
|
288 |
players_only['Book'] = players_only['Player'].map(book_dict)
|
289 |
players_only['Trending Over'] = players_only['Player'].map(trending_over_dict)
|
290 |
players_only['Trending Under'] = players_only['Player'].map(trending_under_dict)
|
291 |
-
players_only['over_adj'] = np_where((players_only['Mean_Outcome'] - players_only['Prop']) > 0, 1, (players_only['Mean_Outcome'] / players_only['Prop'])
|
292 |
-
players_only['under_adj'] = np_where((players_only['Prop'] - players_only['Mean_Outcome']) > 0, 1, (players_only['Prop'] / players_only['Mean_Outcome'])
|
293 |
players_only['poisson_var'] = players_only.apply(calculate_poisson, axis=1)
|
294 |
players_only['10%'] = overall_file.quantile(0.1, axis=1)
|
295 |
players_only['90%'] = overall_file.quantile(0.9, axis=1)
|
@@ -418,8 +418,8 @@ with tab3:
|
|
418 |
players_only['Book'] = players_only['Player'].map(book_dict)
|
419 |
players_only['Trending Over'] = players_only['Player'].map(trending_over_dict)
|
420 |
players_only['Trending Under'] = players_only['Player'].map(trending_under_dict)
|
421 |
-
players_only['over_adj'] = np_where((players_only['Mean_Outcome'] - players_only['Prop']) > 0, 1, (players_only['Mean_Outcome'] / players_only['Prop'])
|
422 |
-
players_only['under_adj'] = np_where((players_only['Prop'] - players_only['Mean_Outcome']) > 0, 1, (players_only['Prop'] / players_only['Mean_Outcome'])
|
423 |
players_only['poisson_var'] = players_only.apply(calculate_poisson, axis=1)
|
424 |
players_only['10%'] = overall_file.quantile(0.1, axis=1)
|
425 |
players_only['90%'] = overall_file.quantile(0.9, axis=1)
|
|
|
288 |
players_only['Book'] = players_only['Player'].map(book_dict)
|
289 |
players_only['Trending Over'] = players_only['Player'].map(trending_over_dict)
|
290 |
players_only['Trending Under'] = players_only['Player'].map(trending_under_dict)
|
291 |
+
players_only['over_adj'] = np_where((players_only['Mean_Outcome'] - players_only['Prop']) > 0, 1, (players_only['Mean_Outcome'] / players_only['Prop']))
|
292 |
+
players_only['under_adj'] = np_where((players_only['Prop'] - players_only['Mean_Outcome']) > 0, 1, (players_only['Prop'] / players_only['Mean_Outcome']))
|
293 |
players_only['poisson_var'] = players_only.apply(calculate_poisson, axis=1)
|
294 |
players_only['10%'] = overall_file.quantile(0.1, axis=1)
|
295 |
players_only['90%'] = overall_file.quantile(0.9, axis=1)
|
|
|
418 |
players_only['Book'] = players_only['Player'].map(book_dict)
|
419 |
players_only['Trending Over'] = players_only['Player'].map(trending_over_dict)
|
420 |
players_only['Trending Under'] = players_only['Player'].map(trending_under_dict)
|
421 |
+
players_only['over_adj'] = np_where((players_only['Mean_Outcome'] - players_only['Prop']) > 0, 1, (players_only['Mean_Outcome'] / players_only['Prop']))
|
422 |
+
players_only['under_adj'] = np_where((players_only['Prop'] - players_only['Mean_Outcome']) > 0, 1, (players_only['Prop'] / players_only['Mean_Outcome']))
|
423 |
players_only['poisson_var'] = players_only.apply(calculate_poisson, axis=1)
|
424 |
players_only['10%'] = overall_file.quantile(0.1, axis=1)
|
425 |
players_only['90%'] = overall_file.quantile(0.9, axis=1)
|