Spaces:
Running
Running
James McCool
commited on
Commit
·
e457ac8
1
Parent(s):
d580e3f
Update salary multiplier calculations in MMA ROO functions
Browse files- function_hold/MMA_functions.py +22 -22
function_hold/MMA_functions.py
CHANGED
@@ -208,27 +208,27 @@ def DK_MMA_ROO_Build(projections_file, std_var, distribution_type):
|
|
208 |
|
209 |
players_only=players_only.drop(['Player'], axis=1)
|
210 |
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
gpp_check = (overall_file - ((salary_file*
|
215 |
|
216 |
players_only['Average_Rank'] = players_only.mean(axis=1)
|
217 |
players_only['Top_finish'] = players_only[players_only == 1].count(axis=1)/total_sims
|
218 |
players_only['Top_5_finish'] = players_only[players_only <= 5].count(axis=1)/total_sims
|
219 |
players_only['Top_10_finish'] = players_only[players_only <= 10].count(axis=1)/total_sims
|
220 |
-
players_only['
|
221 |
-
players_only['
|
222 |
-
players_only['
|
223 |
-
players_only['
|
224 |
players_only['GPP%'] = gpp_check[gpp_check >= 1].count(axis=1)/float(total_sims)
|
225 |
|
226 |
players_only['Player'] = hold_file[['Player']]
|
227 |
|
228 |
-
final_outcomes = players_only[['Player', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '
|
229 |
|
230 |
final_Proj = pd_merge(hold_file, final_outcomes, on="Player")
|
231 |
-
final_Proj = final_Proj[['Player', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '
|
232 |
|
233 |
final_Proj['Own'] = final_Proj['Player'].map(own_dict)
|
234 |
final_Proj['Small_Own'] = final_Proj['Player'].map(small_own_dict)
|
@@ -238,7 +238,7 @@ def DK_MMA_ROO_Build(projections_file, std_var, distribution_type):
|
|
238 |
final_Proj['LevX'] = ((final_Proj[['Top_finish', '6x%', 'Top_5_finish']].mean(axis=1))*100) - final_Proj['Own']
|
239 |
final_Proj['ValX'] = ((final_Proj[['5x%', '6x%']].mean(axis=1))*100) + final_Proj['LevX']
|
240 |
|
241 |
-
final_Proj = final_Proj[['Player', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '
|
242 |
final_Proj = final_Proj.sort_values(by='Median', ascending=False)
|
243 |
|
244 |
return final_Proj.copy()
|
@@ -435,27 +435,27 @@ def FD_MMA_ROO_Build(projections_file, std_var, distribution_type):
|
|
435 |
|
436 |
players_only=players_only.drop(['Player'], axis=1)
|
437 |
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
gpp_check = (overall_file - ((salary_file*
|
442 |
|
443 |
players_only['Average_Rank'] = players_only.mean(axis=1)
|
444 |
players_only['Top_finish'] = players_only[players_only == 1].count(axis=1)/total_sims
|
445 |
players_only['Top_5_finish'] = players_only[players_only <= 5].count(axis=1)/total_sims
|
446 |
players_only['Top_10_finish'] = players_only[players_only <= 10].count(axis=1)/total_sims
|
447 |
-
players_only['
|
448 |
-
players_only['
|
449 |
-
players_only['
|
450 |
-
players_only['
|
451 |
players_only['GPP%'] = gpp_check[gpp_check >= 1].count(axis=1)/float(total_sims)
|
452 |
|
453 |
players_only['Player'] = hold_file[['Player']]
|
454 |
|
455 |
-
final_outcomes = players_only[['Player', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '
|
456 |
|
457 |
final_Proj = pd_merge(hold_file, final_outcomes, on="Player")
|
458 |
-
final_Proj = final_Proj[['Player', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '
|
459 |
|
460 |
final_Proj['Own'] = final_Proj['Player'].map(own_dict)
|
461 |
final_Proj['Small_Own'] = final_Proj['Player'].map(small_own_dict)
|
@@ -465,7 +465,7 @@ def FD_MMA_ROO_Build(projections_file, std_var, distribution_type):
|
|
465 |
final_Proj['LevX'] = ((final_Proj[['Top_finish', '6x%', 'Top_5_finish']].mean(axis=1))*100) - final_Proj['Own']
|
466 |
final_Proj['ValX'] = ((final_Proj[['5x%', '6x%']].mean(axis=1))*100) + final_Proj['LevX']
|
467 |
|
468 |
-
final_Proj = final_Proj[['Player', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '
|
469 |
final_Proj['Salary'] = final_Proj['Salary'].astype(int)
|
470 |
final_Proj = final_Proj.sort_values(by='Median', ascending=False)
|
471 |
|
|
|
208 |
|
209 |
players_only=players_only.drop(['Player'], axis=1)
|
210 |
|
211 |
+
salary_10x_check = (overall_file - (salary_file*10))
|
212 |
+
salary_11x_check = (overall_file - (salary_file*11))
|
213 |
+
salary_12x_check = (overall_file - (salary_file*12))
|
214 |
+
gpp_check = (overall_file - ((salary_file*11)+10))
|
215 |
|
216 |
players_only['Average_Rank'] = players_only.mean(axis=1)
|
217 |
players_only['Top_finish'] = players_only[players_only == 1].count(axis=1)/total_sims
|
218 |
players_only['Top_5_finish'] = players_only[players_only <= 5].count(axis=1)/total_sims
|
219 |
players_only['Top_10_finish'] = players_only[players_only <= 10].count(axis=1)/total_sims
|
220 |
+
players_only['100+%'] = overall_file[overall_file >= 100].count(axis=1)/float(total_sims)
|
221 |
+
players_only['10x%'] = salary_10x_check[salary_10x_check >= 1].count(axis=1)/float(total_sims)
|
222 |
+
players_only['11x%'] = salary_11x_check[salary_11x_check >= 1].count(axis=1)/float(total_sims)
|
223 |
+
players_only['12x%'] = salary_12x_check[salary_12x_check >= 1].count(axis=1)/float(total_sims)
|
224 |
players_only['GPP%'] = gpp_check[gpp_check >= 1].count(axis=1)/float(total_sims)
|
225 |
|
226 |
players_only['Player'] = hold_file[['Player']]
|
227 |
|
228 |
+
final_outcomes = players_only[['Player', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '100+%', '10x%', '11x%', '12x%', 'GPP%']]
|
229 |
|
230 |
final_Proj = pd_merge(hold_file, final_outcomes, on="Player")
|
231 |
+
final_Proj = final_Proj[['Player', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '100+%', '10x%', '11x%', '12x%', 'GPP%']]
|
232 |
|
233 |
final_Proj['Own'] = final_Proj['Player'].map(own_dict)
|
234 |
final_Proj['Small_Own'] = final_Proj['Player'].map(small_own_dict)
|
|
|
238 |
final_Proj['LevX'] = ((final_Proj[['Top_finish', '6x%', 'Top_5_finish']].mean(axis=1))*100) - final_Proj['Own']
|
239 |
final_Proj['ValX'] = ((final_Proj[['5x%', '6x%']].mean(axis=1))*100) + final_Proj['LevX']
|
240 |
|
241 |
+
final_Proj = final_Proj[['Player', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '100+%', '10x%', '11x%', '12x%', 'GPP%', 'Own', 'Small_Own', 'Large_Own', 'Cash_Own', 'CPT_Own', 'LevX', 'ValX']]
|
242 |
final_Proj = final_Proj.sort_values(by='Median', ascending=False)
|
243 |
|
244 |
return final_Proj.copy()
|
|
|
435 |
|
436 |
players_only=players_only.drop(['Player'], axis=1)
|
437 |
|
438 |
+
salary_10x_check = (overall_file - (salary_file*10))
|
439 |
+
salary_11x_check = (overall_file - (salary_file*11))
|
440 |
+
salary_12x_check = (overall_file - (salary_file*12))
|
441 |
+
gpp_check = (overall_file - ((salary_file*11)+10))
|
442 |
|
443 |
players_only['Average_Rank'] = players_only.mean(axis=1)
|
444 |
players_only['Top_finish'] = players_only[players_only == 1].count(axis=1)/total_sims
|
445 |
players_only['Top_5_finish'] = players_only[players_only <= 5].count(axis=1)/total_sims
|
446 |
players_only['Top_10_finish'] = players_only[players_only <= 10].count(axis=1)/total_sims
|
447 |
+
players_only['100+%'] = overall_file[overall_file >= 100].count(axis=1)/float(total_sims)
|
448 |
+
players_only['10x%'] = salary_10x_check[salary_10x_check >= 1].count(axis=1)/float(total_sims)
|
449 |
+
players_only['11x%'] = salary_11x_check[salary_11x_check >= 1].count(axis=1)/float(total_sims)
|
450 |
+
players_only['12x%'] = salary_12x_check[salary_12x_check >= 1].count(axis=1)/float(total_sims)
|
451 |
players_only['GPP%'] = gpp_check[gpp_check >= 1].count(axis=1)/float(total_sims)
|
452 |
|
453 |
players_only['Player'] = hold_file[['Player']]
|
454 |
|
455 |
+
final_outcomes = players_only[['Player', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '100+%', '10x%', '11x%', '12x%', 'GPP%']]
|
456 |
|
457 |
final_Proj = pd_merge(hold_file, final_outcomes, on="Player")
|
458 |
+
final_Proj = final_Proj[['Player', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '100+%', '10x%', '11x%', '12x%', 'GPP%']]
|
459 |
|
460 |
final_Proj['Own'] = final_Proj['Player'].map(own_dict)
|
461 |
final_Proj['Small_Own'] = final_Proj['Player'].map(small_own_dict)
|
|
|
465 |
final_Proj['LevX'] = ((final_Proj[['Top_finish', '6x%', 'Top_5_finish']].mean(axis=1))*100) - final_Proj['Own']
|
466 |
final_Proj['ValX'] = ((final_Proj[['5x%', '6x%']].mean(axis=1))*100) + final_Proj['LevX']
|
467 |
|
468 |
+
final_Proj = final_Proj[['Player', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '100+%', '10x%', '11x%', '12x%', 'GPP%', 'Own', 'Small_Own', 'Large_Own', 'Cash_Own', 'CPT_Own', 'LevX', 'ValX']]
|
469 |
final_Proj['Salary'] = final_Proj['Salary'].astype(int)
|
470 |
final_Proj = final_Proj.sort_values(by='Median', ascending=False)
|
471 |
|