Spaces:
Running
Running
James McCool
commited on
Commit
·
9771fe3
1
Parent(s):
7f87d3d
Refine VORP index calculations in Streamlit app by replacing clip with min function for upper limits on QB, RB, WR, and TE multipliers, ensuring consistent accuracy in player ranking adjustments.
Browse files- src/streamlit_app.py +8 -8
src/streamlit_app.py
CHANGED
@@ -275,10 +275,10 @@ def designate_custom_position_reqs(league_settings: dict, flex_percentiles: dict
|
|
275 |
wr_base = league_settings['WR'] * league_settings['TEAMS']
|
276 |
te_base = league_settings['TE'] * league_settings['TEAMS']
|
277 |
|
278 |
-
qb_rv_index = math.ceil((qb_base) * flex_multipliers['QB'])
|
279 |
-
rb_rv_index = math.ceil((rb_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['RB'])) * flex_multipliers['RB'])
|
280 |
-
wr_rv_index = math.ceil((wr_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['WR'])) * flex_multipliers['WR'])
|
281 |
-
te_rv_index = math.ceil((te_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['TE'])) * flex_multipliers['TE'])
|
282 |
|
283 |
print(f"Need {qb_rv_index} for QB in {league_settings['TEAMS']} teams with type {league_settings['TYPE']}")
|
284 |
print(f"Need {rb_rv_index} for RB in {league_settings['TEAMS']} teams with type {league_settings['TYPE']}")
|
@@ -300,10 +300,10 @@ def designate_base_position_reqs() -> dict:
|
|
300 |
wr_base = 3 * 12
|
301 |
te_base = 1 * 12
|
302 |
|
303 |
-
qb_rv_index = math.ceil(qb_base * 2)
|
304 |
-
rb_rv_index = math.ceil((rb_base + ((12 * 1) * .40)) * 2)
|
305 |
-
wr_rv_index = math.ceil((wr_base + ((12 * 1) * .55)) * 2)
|
306 |
-
te_rv_index = math.ceil((te_base + ((12 * 1) * .05)) * 2)
|
307 |
|
308 |
print(f"Need {qb_rv_index} for QB in {12} teams with type {league_settings['TYPE']}")
|
309 |
print(f"Need {rb_rv_index} for RB in {12} teams with type {league_settings['TYPE']}")
|
|
|
275 |
wr_base = league_settings['WR'] * league_settings['TEAMS']
|
276 |
te_base = league_settings['TE'] * league_settings['TEAMS']
|
277 |
|
278 |
+
qb_rv_index = min(math.ceil((qb_base) * flex_multipliers['QB']), 30)
|
279 |
+
rb_rv_index = min(math.ceil((rb_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['RB'])) * flex_multipliers['RB']), 60)
|
280 |
+
wr_rv_index = min(math.ceil((wr_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['WR'])) * flex_multipliers['WR']), 90)
|
281 |
+
te_rv_index = min(math.ceil((te_base + ((league_settings['TEAMS'] * league_settings['FLEX']) * flex_percentiles['TE'])) * flex_multipliers['TE']), 30)
|
282 |
|
283 |
print(f"Need {qb_rv_index} for QB in {league_settings['TEAMS']} teams with type {league_settings['TYPE']}")
|
284 |
print(f"Need {rb_rv_index} for RB in {league_settings['TEAMS']} teams with type {league_settings['TYPE']}")
|
|
|
300 |
wr_base = 3 * 12
|
301 |
te_base = 1 * 12
|
302 |
|
303 |
+
qb_rv_index = min(math.ceil(qb_base * 2), 30)
|
304 |
+
rb_rv_index = min(math.ceil((rb_base + ((12 * 1) * .40)) * 2), 60)
|
305 |
+
wr_rv_index = min(math.ceil((wr_base + ((12 * 1) * .55)) * 2), 90)
|
306 |
+
te_rv_index = min(math.ceil((te_base + ((12 * 1) * .05)) * 2), 30)
|
307 |
|
308 |
print(f"Need {qb_rv_index} for QB in {12} teams with type {league_settings['TYPE']}")
|
309 |
print(f"Need {rb_rv_index} for RB in {12} teams with type {league_settings['TYPE']}")
|