@@ -1681,6 +1681,7 @@ def react( # noqa: C901
16811681 feature_bounds_map : t .Optional [Mapping ] = None ,
16821682 feature_pre_process_code_map : t .Optional [Mapping ] = None ,
16831683 feature_post_process_code_map : t .Optional [Mapping ] = None ,
1684+ filter_fanout_values : bool = False ,
16841685 generate_new_cases : GenerateNewCases = "no" ,
16851686 goal_features_map : t .Optional [Mapping ] = None ,
16861687 initial_batch_size : t .Optional [int ] = None ,
@@ -2202,7 +2203,10 @@ def react( # noqa: C901
22022203 resulting value will be used as part of the context for following
22032204 action features. The custom code will have access to all context
22042205 feature values and previously generated action feature values.
2205-
2206+ filter_fanout_values : bool, default False
2207+ When true, predictions of features with fanned out values will be
2208+ made while holding out other cases that had the same values
2209+ duplicated.
22062210 generate_new_cases : {"always", "attempt", "no"}, default "no"
22072211 (Optional) Whether to generate new cases.
22082212
@@ -2411,6 +2415,7 @@ def react( # noqa: C901
24112415 "derived_action_features" : derived_action_features ,
24122416 "feature_pre_process_code_map" : feature_pre_process_code_map ,
24132417 "feature_post_process_code_map" : feature_post_process_code_map ,
2418+ "filter_fanout_values" : filter_fanout_values ,
24142419 "goal_features_map" : goal_features_map ,
24152420 "post_process_features" : post_process_features ,
24162421 "post_process_values" : post_process_values ,
@@ -2457,6 +2462,7 @@ def react( # noqa: C901
24572462 "derived_action_features" : derived_action_features ,
24582463 "feature_pre_process_code_map" : feature_pre_process_code_map ,
24592464 "feature_post_process_code_map" : feature_post_process_code_map ,
2465+ "filter_fanout_values" : filter_fanout_values ,
24602466 "post_process_features" : post_process_features ,
24612467 "post_process_values" : post_process_values ,
24622468 "use_differential_privacy" : use_differential_privacy ,
@@ -2764,6 +2770,7 @@ def react_series( # noqa: C901
27642770 exclude_novel_nominals_from_uniqueness_check : bool = False ,
27652771 feature_bounds_map : t .Optional [Mapping [str , Mapping [str , t .Any ]]] = None ,
27662772 feature_post_process_code_map : t .Optional [Mapping ] = None ,
2773+ filter_fanout_values : bool = False ,
27672774 final_time_steps : t .Optional [list [t .Any ]] = None ,
27682775 generate_new_cases : GenerateNewCases = "no" ,
27692776 goal_features_map : t .Optional [Mapping ] = None ,
@@ -2897,6 +2904,10 @@ def react_series( # noqa: C901
28972904 feature values and previously generated action feature values of
28982905 the timestep being generated, as well as the feature values of all
28992906 previously generated timesteps.
2907+ filter_fanout_values : bool, default False
2908+ When true, predictions of features with fanned out values will be
2909+ made while holding out other cases that had the same values
2910+ duplicated.
29002911 series_context_features : iterable of str, optional
29012912 List of context features corresponding to ``series_context_values``.
29022913 series_context_values : list of list of list of object or list of DataFrame, optional
@@ -3130,6 +3141,7 @@ def react_series( # noqa: C901
31303141 "constraints" : constraints ,
31313142 "continue_series" : continue_series ,
31323143 "feature_post_process_code_map" : feature_post_process_code_map ,
3144+ "filter_fanout_values" : filter_fanout_values ,
31333145 "final_time_steps" : final_time_steps ,
31343146 "init_time_steps" : init_time_steps ,
31353147 "series_stop_maps" : series_stop_maps ,
@@ -3183,6 +3195,7 @@ def react_series( # noqa: C901
31833195 "constraints" : constraints ,
31843196 "continue_series" : continue_series ,
31853197 "feature_post_process_code_map" : feature_post_process_code_map ,
3198+ "filter_fanout_values" : filter_fanout_values ,
31863199 "final_time_steps" : final_time_steps ,
31873200 "init_time_steps" : init_time_steps ,
31883201 "series_stop_maps" : series_stop_maps ,
@@ -3689,6 +3702,7 @@ def react_aggregate( # noqa: C901
36893702 convergence_threshold : t .Optional [float ] = None ,
36903703 features_to_derive : t .Optional [Collection [str ]] = None ,
36913704 feature_influences_action_feature : t .Optional [str ] = None ,
3705+ filter_fanout_values : bool = False ,
36923706 forecast_window_length : t .Optional [float ] = None ,
36933707 goal_dependent_features : t .Optional [Collection [str ]] = None ,
36943708 goal_features_map : t .Optional [Mapping ] = None ,
@@ -3711,7 +3725,7 @@ def react_aggregate( # noqa: C901
37113725 value_robust_contributions_features : t .Optional [Collection [str ]] = None ,
37123726 value_robust_contributions_num_buckets : int = 30 ,
37133727 value_robust_contributions_min_samples : int = 15 ,
3714- value_robust_contributions_min_cases : int = 15 ,
3728+ value_robust_contributions_min_cases : int | dict [ str , int ] = 15 ,
37153729 weight_feature : t .Optional [str ] = None ,
37163730 ) -> dict [str , dict [str , t .Any ]]:
37173731 """
@@ -3914,6 +3928,10 @@ def react_aggregate( # noqa: C901
39143928 feature_influences_action_feature : str, optional
39153929 When computing feature influences such as accuracy and prediction contributions, use this feature as
39163930 the action feature. If feature influences ``details`` are selected, this feature must be provided.
3931+ filter_fanout_values : bool, default False
3932+ When true, predictions of features with fanned out values will be
3933+ made while holding out other cases that had the same values
3934+ duplicated.
39173935 forecast_window_length : float, optional
39183936 A value specifing a length of time over which to measure the accuracy of forecasts. When
39193937 specified, returned prediction statistics and full residuals will be measuring the accuracy
@@ -4044,11 +4062,12 @@ def react_aggregate( # noqa: C901
40444062 The minumum number of samples required for a combination of feature values for its
40454063 aggregated measure to be returned when computing the "value_robust_accuracy_contributions",
40464064 "value_robust_prediction_contributions" or "value_robust_surprisal_asymmetry" details.
4047- value_robust_contributions_min_cases: int, default 15
4065+ value_robust_contributions_min_cases: int or map of str to int , default 15
40484066 The minimum number of unique cases for a given nominal class or continuous bucket to be
40494067 used as a possible feature value when collecting all combinations of feature values in
4050- the data to report metrics over. If unspecified, there is no filtering based on number
4051- of unique cases.
4068+ the data to report metrics over. May be specified as a single value or a mapping of feature names to
4069+ values defining individual thresholds for each feature. If defined as a mapping, then any features without
4070+ defined thresholds will use a default value of 15.
40524071 weight_feature : str, optional
40534072 The name of feature whose values to use as case weights.
40544073 When left unspecified uses the internally managed case weight.
@@ -4107,6 +4126,7 @@ def react_aggregate( # noqa: C901
41074126 "convergence_threshold" : convergence_threshold ,
41084127 "features_to_derive" : features_to_derive ,
41094128 "feature_influences_action_feature" : feature_influences_action_feature ,
4129+ "filter_fanout_values" : filter_fanout_values ,
41104130 "forecast_window_length" : forecast_window_length ,
41114131 "goal_dependent_features" : goal_dependent_features ,
41124132 "goal_features_map" : goal_features_map ,
0 commit comments