@@ -86,10 +86,10 @@ def select_treatments(similarity_matrix, treatment_size, excluded_locations):
8686 max_combinations = comb (n , r )
8787
8888 n_combinations = max_combinations
89- # if n_combinations > 5000:
90- # n_combinations = 5000
91- if n_combinations > 2000 :
92- n_combinations = 2000
89+ if n_combinations > 5000 :
90+ n_combinations = 5000
91+ # if n_combinations > 2000:
92+ # n_combinations = 2000
9393
9494 logger .debug (f"Generating { n_combinations } combinations" )
9595
@@ -517,8 +517,8 @@ def select_treatments_exclusive(
517517
518518 # Smart candidate limit based on problem size
519519 available_ratio = n / len (similarity_matrix .columns )
520- # base_candidates = min(5000, max_combinations)
521- base_candidates = min (2000 , max_combinations )
520+ base_candidates = min (5000 , max_combinations )
521+ # base_candidates = min(2000, max_combinations)
522522
523523 if available_ratio < 0.3 : # Many locations excluded, need more candidates
524524 max_candidates = min (base_candidates * 2 , max_combinations )
@@ -818,10 +818,10 @@ def BetterGroups(
818818 """
819819 unique_locations = data ["location" ].unique ()
820820 no_locations = len (unique_locations )
821- max_group_size = round (no_locations * 0.35 )
822- min_elements_in_treatment = round (no_locations * 0.20 )
823- # max_group_size = round(no_locations * 0.45)
824- # min_elements_in_treatment = round(no_locations * 0.15)
821+ # max_group_size = round(no_locations * 0.35)
822+ # min_elements_in_treatment = round(no_locations * 0.20)
823+ max_group_size = round (no_locations * 0.45 )
824+ min_elements_in_treatment = round (no_locations * 0.15 )
825825 min_holdout = 100 - (maximum_treatment_percentage * 100 )
826826 total_Y = data ["Y" ].sum ()
827827
0 commit comments