James McCool
commited on
Commit
·
0a58221
1
Parent(s):
df9baf3
Update lineups_to_add calculation in exposure_spread function to use replace_exposure, ensuring accurate adjustments for player additions during exposure evaluations.
Browse files
global_func/exposure_spread.py
CHANGED
|
@@ -253,13 +253,14 @@ def exposure_spread(working_frame, exposure_player, exposure_target, exposure_st
|
|
| 253 |
)
|
| 254 |
|
| 255 |
player_exposure = player_mask.sum() / len(working_frame)
|
|
|
|
| 256 |
|
| 257 |
# find the number of lineups that need to be removed to reach the target exposure
|
| 258 |
if exposure_target == 0:
|
| 259 |
lineups_to_remove = (player_exposure * len(working_frame))
|
| 260 |
else:
|
| 261 |
lineups_to_remove = ((player_exposure - exposure_target) * len(working_frame)) * 1.01
|
| 262 |
-
lineups_to_add = ((exposure_target -
|
| 263 |
|
| 264 |
# isolate the rows that contain the player
|
| 265 |
player_rows = working_frame[player_mask]
|
|
|
|
| 253 |
)
|
| 254 |
|
| 255 |
player_exposure = player_mask.sum() / len(working_frame)
|
| 256 |
+
replace_exposure = replace_mask.sum() / len(working_frame)
|
| 257 |
|
| 258 |
# find the number of lineups that need to be removed to reach the target exposure
|
| 259 |
if exposure_target == 0:
|
| 260 |
lineups_to_remove = (player_exposure * len(working_frame))
|
| 261 |
else:
|
| 262 |
lineups_to_remove = ((player_exposure - exposure_target) * len(working_frame)) * 1.01
|
| 263 |
+
lineups_to_add = ((exposure_target - replace_exposure) * len(working_frame)) * 1.01
|
| 264 |
|
| 265 |
# isolate the rows that contain the player
|
| 266 |
player_rows = working_frame[player_mask]
|