James McCool commited on
Commit
27effcd
·
1 Parent(s): b595660

Standardize flex multipliers for QB, RB, WR, and TE to 1 across all scoring formats in Streamlit app, ensuring consistent evaluation metrics. Adjust maximum index limits for RB and WR to 60 and 96 respectively for improved accuracy in player assessments.

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +24 -24
src/streamlit_app.py CHANGED
@@ -74,34 +74,34 @@ pos_vorp_limiters = {
74
 
75
  flex_multipliers = {
76
  'Half PPR': {
77
- 'QB': 2,
78
- 'RB': 3,
79
- 'WR': 3,
80
- 'TE': 2,
81
  },
82
  'PPR': {
83
- 'QB': 2,
84
- 'RB': 3,
85
- 'WR': 3,
86
- 'TE': 2,
87
  },
88
  'Standard': {
89
- 'QB': 2,
90
- 'RB': 3,
91
- 'WR': 3,
92
- 'TE': 2,
93
  },
94
  'Superflex': {
95
- 'QB': 3,
96
- 'RB': 2,
97
- 'WR': 2,
98
- 'TE': 2,
99
  },
100
  'TE Premium': {
101
- 'QB': 2,
102
- 'RB': 2,
103
- 'WR': 2,
104
- 'TE': 3,
105
  },
106
  }
107
 
@@ -281,8 +281,8 @@ def designate_custom_position_reqs(league_settings: dict, flex_percentiles: dict
281
  te_flex_mult = flex_multipliers['TE'] * (league_settings['TEAMS'] / 12)
282
 
283
  qb_rv_index = min(math.ceil((qb_base) * qb_flex_mult), 30)
284
- rb_rv_index = min(math.ceil((rb_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['RB'])) * rb_flex_mult), 1000)
285
- wr_rv_index = min(math.ceil((wr_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['WR'])) * wr_flex_mult), 1000)
286
  te_rv_index = min(math.ceil((te_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['TE'])) * te_flex_mult), 30)
287
 
288
  print(f"Need {qb_rv_index} for QB in {league_settings['TEAMS']} teams with type {league_settings['TYPE']}")
@@ -306,8 +306,8 @@ def designate_base_position_reqs() -> dict:
306
  te_base = 1 * 12
307
 
308
  qb_rv_index = min(math.ceil(qb_base * 2), 30)
309
- rb_rv_index = min(math.ceil((rb_base + ((12 * 1) * .40)) * 2), 1000)
310
- wr_rv_index = min(math.ceil((wr_base + ((12 * 1) * .55)) * 2), 1000)
311
  te_rv_index = min(math.ceil((te_base + ((12 * 1) * .05)) * 2), 30)
312
 
313
  print(f"Need {qb_rv_index} for QB in {12} teams with type {league_settings['TYPE']}")
 
74
 
75
  flex_multipliers = {
76
  'Half PPR': {
77
+ 'QB': 1,
78
+ 'RB': 1,
79
+ 'WR': 1,
80
+ 'TE': 1,
81
  },
82
  'PPR': {
83
+ 'QB': 1,
84
+ 'RB': 1,
85
+ 'WR': 1,
86
+ 'TE': 1,
87
  },
88
  'Standard': {
89
+ 'QB': 1,
90
+ 'RB': 1,
91
+ 'WR': 1,
92
+ 'TE': 1,
93
  },
94
  'Superflex': {
95
+ 'QB': 1,
96
+ 'RB': 1,
97
+ 'WR': 1,
98
+ 'TE': 1,
99
  },
100
  'TE Premium': {
101
+ 'QB': 1,
102
+ 'RB': 1,
103
+ 'WR': 1,
104
+ 'TE': 1,
105
  },
106
  }
107
 
 
281
  te_flex_mult = flex_multipliers['TE'] * (league_settings['TEAMS'] / 12)
282
 
283
  qb_rv_index = min(math.ceil((qb_base) * qb_flex_mult), 30)
284
+ rb_rv_index = min(math.ceil((rb_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['RB'])) * rb_flex_mult), 60)
285
+ wr_rv_index = min(math.ceil((wr_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['WR'])) * wr_flex_mult), 96)
286
  te_rv_index = min(math.ceil((te_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['TE'])) * te_flex_mult), 30)
287
 
288
  print(f"Need {qb_rv_index} for QB in {league_settings['TEAMS']} teams with type {league_settings['TYPE']}")
 
306
  te_base = 1 * 12
307
 
308
  qb_rv_index = min(math.ceil(qb_base * 2), 30)
309
+ rb_rv_index = min(math.ceil((rb_base + ((12 * 1) * .40)) * 2), 60)
310
+ wr_rv_index = min(math.ceil((wr_base + ((12 * 1) * .55)) * 2), 96)
311
  te_rv_index = min(math.ceil((te_base + ((12 * 1) * .05)) * 2), 30)
312
 
313
  print(f"Need {qb_rv_index} for QB in {12} teams with type {league_settings['TYPE']}")