Skip to content

Commit

Permalink
22264: Adds #react_series_stationary allowing users to predict stat…
Browse files Browse the repository at this point in the history
…ionary feature values for series data, MINOR (#391)
  • Loading branch information
cademack authored Jan 28, 2025
1 parent 2e57a40 commit a24cd0a
Show file tree
Hide file tree
Showing 8 changed files with 777 additions and 84 deletions.
1 change: 1 addition & 0 deletions howso.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"react_group"
"react_aggregate"
"react_series"
"react_series_stationary"
"react_series_utilities"
"react_utilities"
"remove_cases"
Expand Down
19 changes: 19 additions & 0 deletions howso/details_cases.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@
;return the influential_K
(declare (assoc candidate_case_ids (trunc sorted_influence_cases influential_k)))

(if return_entity_ids_only
(conclude
(accum (assoc
output (assoc "influential_cases" candidate_case_ids)
))
)
)

;pull all the feature values for the cases
(declare (assoc
audit_data
Expand Down Expand Up @@ -244,6 +252,17 @@
))
))

(if return_entity_ids_only
(conclude
(accum (assoc
output
(assoc
"most_similar_cases" (first similar_cases)
)
))
)
)

(declare (assoc
item_retrieval_map
(zip (append
Expand Down
26 changes: 23 additions & 3 deletions howso/react.amlg
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,10 @@
post_process_features (list)
post_process_values (list)

leave_series_out (false)
leave_case_out (false)
skip_encoding (not !hasEncodedFeatures)
skip_decoding (not !hasEncodedFeatures)
case_indices (null)
use_regional_residuals (true)
feature_bounds_map (assoc)
Expand Down Expand Up @@ -934,6 +937,7 @@
(true)
)
case_indices case_indices
leave_series_out leave_series_out
leave_case_out leave_case_out
preserve_feature_values preserve_feature_values
new_case_threshold new_case_threshold
Expand Down Expand Up @@ -975,6 +979,7 @@
(false)
)
case_indices case_indices
leave_series_out leave_series_out
leave_case_out leave_case_out
preserve_feature_values preserve_feature_values
new_case_threshold new_case_threshold
Expand Down Expand Up @@ -1123,12 +1128,15 @@
extra_features extra_features
ignore_case ignore_case
case_indices case_indices
leave_series_out leave_series_out
leave_case_out leave_case_out
weight_feature weight_feature
use_case_weights use_case_weights
preserve_feature_values preserve_feature_values
new_case_threshold new_case_threshold
allow_nulls allow_nulls
skip_decoding skip_decoding
skip_encoding skip_encoding
filtering_queries holdout_queries
))
)
Expand Down Expand Up @@ -1229,13 +1237,25 @@
;for all time series where the time feature is a context,
;filter out future data based on whether the time feature is universal
(if !tsTimeFeature
(if (not impute_react)
(let
(assoc context_map (zip context_features context_values) )
(let
(assoc context_map (zip context_features context_values) )
(if (not impute_react)
(if (contains_index context_map !tsTimeFeature)
(accum (assoc custom_extra_filtering_queries (call !ComputeTimeSeriesFilterQuery) ))
)
)
(if leave_series_out
(accum (assoc
custom_extra_filtering_queries
(map
(lambda (query_not_equals (current_value) (get context_map (current_value))) )
(indices (keep
context_map
(get !tsModelFeaturesMap "series_id_features")
))
)
))
)
)
)

Expand Down
Loading

0 comments on commit a24cd0a

Please sign in to comment.