James McCool commited on
Commit
0f6f9ba
·
1 Parent(s): 11220fa

Refine lineups_to_remove calculation in exposure_spread function to ensure accurate adjustment based on player exposure and target, applying a consistent 150% factor for lineup modifications.

Browse files
Files changed (1) hide show
  1. global_func/exposure_spread.py +1 -1
global_func/exposure_spread.py CHANGED
@@ -260,7 +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
- 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]
 
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 = ((player_exposure - exposure_target) * len(working_frame)) * 1.5
264
 
265
  # isolate the rows that contain the player
266
  player_rows = working_frame[player_mask]