James McCool commited on
Commit
95055fb
·
1 Parent(s): 4ac0202

Refactor app.py to adjust 'over_adj' and 'under_adj' calculations by dividing by 100, enhancing the accuracy of player projections. This change ensures that the adjustments based on the relationship between 'Mean_Outcome' and 'Prop' are correctly scaled, improving the reliability of prop outcome analysis.

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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'] = (players_only['Mean_Outcome'] / players_only['Prop']) - 1
292
- players_only['under_adj'] = (players_only['Prop'] / players_only['Mean_Outcome']) - 1
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'] = (players_only['Mean_Outcome'] / players_only['Prop']) - 1
422
- players_only['under_adj'] = (players_only['Prop'] / players_only['Mean_Outcome']) - 1
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'] = ((players_only['Mean_Outcome'] / players_only['Prop']) - 1) / 100
292
+ players_only['under_adj'] = ((players_only['Prop'] / players_only['Mean_Outcome']) - 1) / 100
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'] = ((players_only['Mean_Outcome'] / players_only['Prop']) - 1) / 100
422
+ players_only['under_adj'] = ((players_only['Prop'] / players_only['Mean_Outcome']) - 1) / 100
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)