James McCool
commited on
Commit
·
11220fa
1
Parent(s):
45f0bb9
Refactor lineups_to_remove calculation in exposure_spread function to streamline logic, ensuring consistent application of the 150% factor for lineup adjustments.
Browse files
global_func/exposure_spread.py
CHANGED
|
@@ -260,11 +260,7 @@ def exposure_spread(working_frame, exposure_player, exposure_target, exposure_st
|
|
| 260 |
player_exposure = player_mask.sum() / len(working_frame)
|
| 261 |
|
| 262 |
# find the number of lineups that need to be removed to reach the target exposure
|
| 263 |
-
|
| 264 |
-
lineups_to_remove = (player_exposure - exposure_target) * len(working_frame)
|
| 265 |
-
else:
|
| 266 |
-
lineups_to_remove = (player_exposure - exposure_target) * len(working_frame)
|
| 267 |
-
lineups_to_remove = math.ceil(lineups_to_remove * 1.5)
|
| 268 |
|
| 269 |
# isolate the rows that contain the player
|
| 270 |
player_rows = working_frame[player_mask]
|
|
|
|
| 260 |
player_exposure = player_mask.sum() / len(working_frame)
|
| 261 |
|
| 262 |
# find the number of lineups that need to be removed to reach the target exposure
|
| 263 |
+
lineups_to_remove = math.ceil(lineups_to_remove * 1.5)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
|
| 265 |
# isolate the rows that contain the player
|
| 266 |
player_rows = working_frame[player_mask]
|