From 16382cee7b3b5e4a875594e5c233b73eb175a0f3 Mon Sep 17 00:00:00 2001 From: Cade Mack <24661281+cademack@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:33:36 -0500 Subject: [PATCH] should be in for prediction contributions --- howso/contributions.amlg | 4 ++++ howso/feature_residuals.amlg | 1 + howso/react_aggregate.amlg | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/howso/contributions.amlg b/howso/contributions.amlg index 61d0f0cc..b42c451a 100644 --- a/howso/contributions.amlg +++ b/howso/contributions.amlg @@ -21,6 +21,7 @@ ; run_on_local_model: optional, if true will use all the provided cases and not store results to model ; context_condition_filter_query: a list of queries that can be used to filter the possible set of cases that can be used for predictions ; derive_action_feature: flag, if true action feature will be derived and the features needed to derive will be predicted + ; goal_features_map: assoc of goal feature stuff, to be passed directly into DiscriminativeReact #!CalculateFeaturePredictionContributions (declare (assoc @@ -36,6 +37,7 @@ run_on_local_model (false) context_condition_filter_query (list) derive_action_feature (false) + goal_features_map (assoc) ) (declare (assoc @@ -679,6 +681,7 @@ details (assoc "categorical_action_probabilities" action_is_nominal) hyperparam_map hyperparam_map filtering_queries context_condition_filter_query + goal_features_map goal_features_map )) ;need to react to predict the non context features needed for derivation, then derive @@ -699,6 +702,7 @@ details (assoc "categorical_action_probabilities" action_is_nominal) hyperparam_map hyperparam_map filtering_queries context_condition_filter_query + goal_features_map goal_features_map )) "action_values" ) diff --git a/howso/feature_residuals.amlg b/howso/feature_residuals.amlg index 2d0d7a06..2101a655 100644 --- a/howso/feature_residuals.amlg +++ b/howso/feature_residuals.amlg @@ -218,6 +218,7 @@ ; expand_confusion_matrices: flag, optional, default true. When use_shared_deviations is true, if there are confusion matrices for shared features, they will be copied over ; for all non-primary shared features. When false, confusion matrices will not be copied and remain only for the primary features. ; features_to_derive: a list of features whose values should be derived rather than interpolated + ; goal_features_map: assoc of goal feature stuff, to be passed directly into DiscriminativeReact #!CalculateFeatureResiduals (declare (assoc diff --git a/howso/react_aggregate.amlg b/howso/react_aggregate.amlg index c84c5928..c241e587 100644 --- a/howso/react_aggregate.amlg +++ b/howso/react_aggregate.amlg @@ -447,6 +447,7 @@ case_ids case_ids strict_case_ids (!= 0 (size action_condition_filter_query)) features_to_derive features_to_derive + goal_features_map goal_features_map )) selected_prediction_stats (call !ProcessSelectedPredictionStats (assoc selected_prediction_stats (or (get details "selected_prediction_stats") []))) @@ -495,6 +496,7 @@ context_condition_filter_query context_condition_filter_query strict_case_ids (!= 0 (size action_condition_filter_query)) features_to_derive features_to_derive + goal_features_map goal_features_map )) "residual_map" ) @@ -524,6 +526,7 @@ context_condition_filter_query context_condition_filter_query strict_case_ids (!= 0 (size action_condition_filter_query)) features_to_derive features_to_derive + goal_features_map goal_features_map )) "residual_map" ) @@ -553,6 +556,7 @@ valid_weight_feature valid_weight_feature strict_case_ids (!= 0 (size action_condition_filter_query)) features_to_derive features_to_derive + goal_features_map goal_features_map )) "residual_map" ) @@ -585,6 +589,7 @@ context_condition_filter_query context_condition_filter_query num_samples num_samples derive_action_feature (contains_value features_to_derive feature_influences_action_feature) + goal_features_map goal_features_map )) )) ) @@ -603,6 +608,7 @@ num_robust_influence_samples_per_case num_robust_influence_samples_per_case context_condition_filter_query context_condition_filter_query derive_action_feature (contains_value features_to_derive feature_influences_action_feature) + goal_features_map goal_features_map )) )) )