James McCool commited on
Commit
b324c2d
·
1 Parent(s): 6237746

Update MMA ROO functions to use separate KO and submission odds dictionaries

Browse files
Files changed (1) hide show
  1. function_hold/MMA_functions.py +6 -4
function_hold/MMA_functions.py CHANGED
@@ -113,9 +113,10 @@ def DK_MMA_ROO_Build(projections_file, std_var, distribution_type):
113
  small_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Small Field Own%']))
114
  large_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Large Field Own%']))
115
  cash_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Cash Own%']))
116
- min_dict = dict(zip(basic_own_df.Player, basic_own_df.KO_var))
 
117
 
118
- flex_file = basic_own_df[['Player', 'Salary', 'Median', 'KO_var']]
119
  flex_file = flex_file.rename(columns={"Agg": "Median"})
120
  flex_file['Median'] = flex_file['Median'] - (flex_file['Median'] * (flex_file['range_var']-.5))
121
  flex_file['Floor'] = flex_file['Median'] * (1-flex_file['range_var'])
@@ -339,9 +340,10 @@ def FD_MMA_ROO_Build(projections_file, std_var, distribution_type):
339
  small_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Small Field Own%']))
340
  large_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Large Field Own%']))
341
  cash_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Cash Own%']))
342
- min_dict = dict(zip(basic_own_df.Player, basic_own_df.KO_var))
 
343
 
344
- flex_file = basic_own_df[['Player', 'Salary', 'Median', 'KO_var']]
345
  flex_file = flex_file.rename(columns={"Agg": "Median"})
346
  flex_file['Median'] = flex_file['Median'] - (flex_file['Median'] * (flex_file['range_var']-.5))
347
  flex_file['Floor'] = flex_file['Median'] * (1-flex_file['range_var'])
 
113
  small_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Small Field Own%']))
114
  large_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Large Field Own%']))
115
  cash_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Cash Own%']))
116
+ ko_dict = dict(zip(basic_own_df.Player, basic_own_df.KO_odds))
117
+ sub_dict = dict(zip(basic_own_df.Player, basic_own_df.Sub_odds))
118
 
119
+ flex_file = basic_own_df[['Player', 'Salary', 'Median', 'KO_odds', 'Sub_odds']]
120
  flex_file = flex_file.rename(columns={"Agg": "Median"})
121
  flex_file['Median'] = flex_file['Median'] - (flex_file['Median'] * (flex_file['range_var']-.5))
122
  flex_file['Floor'] = flex_file['Median'] * (1-flex_file['range_var'])
 
340
  small_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Small Field Own%']))
341
  large_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Large Field Own%']))
342
  cash_own_dict = dict(zip(basic_own_df.Player, basic_own_df['Cash Own%']))
343
+ ko_dict = dict(zip(basic_own_df.Player, basic_own_df.KO_odds))
344
+ sub_dict = dict(zip(basic_own_df.Player, basic_own_df.Sub_odds))
345
 
346
+ flex_file = basic_own_df[['Player', 'Salary', 'Median', 'KO_odds', 'Sub_odds']]
347
  flex_file = flex_file.rename(columns={"Agg": "Median"})
348
  flex_file['Median'] = flex_file['Median'] - (flex_file['Median'] * (flex_file['range_var']-.5))
349
  flex_file['Floor'] = flex_file['Median'] * (1-flex_file['range_var'])