Skip to content

Commit

Permalink
should be in for prediction contributions
Browse files Browse the repository at this point in the history
  • Loading branch information
cademack committed Mar 3, 2025
1 parent dcf5c7b commit 16382ce
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions howso/contributions.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,6 +37,7 @@
run_on_local_model (false)
context_condition_filter_query (list)
derive_action_feature (false)
goal_features_map (assoc)
)

(declare (assoc
Expand Down Expand Up @@ -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
Expand All @@ -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"
)
Expand Down
1 change: 1 addition & 0 deletions howso/feature_residuals.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions howso/react_aggregate.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -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") [])))
Expand Down Expand Up @@ -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"
)
Expand Down Expand Up @@ -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"
)
Expand Down Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
))
))
)
Expand All @@ -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
))
))
)
Expand Down

0 comments on commit 16382ce

Please sign in to comment.