From aba3623ed47820982ec9acaaa1d15f73fdc6cde8 Mon Sep 17 00:00:00 2001 From: howsoRes <144272317+howsoRes@users.noreply.github.com> Date: Thu, 28 May 2026 10:53:34 -0400 Subject: [PATCH] 25557: Fixes feature weights to use entire matrix if appropriate for similarity conviction and react details --- module/conviction.amlg | 6 +++++- module/details.amlg | 3 +-- unit_tests/ut_h_rebalance_features.amlg | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/module/conviction.amlg b/module/conviction.amlg index c8e5c25eb..e15202eed 100644 --- a/module/conviction.amlg +++ b/module/conviction.amlg @@ -818,7 +818,11 @@ ) (declare (assoc - feature_weights (get hyperparam_map "featureWeights") + feature_weights + (if (size (get hyperparam_map "featureMdaMap")) + (get hyperparam_map "featureMdaMap") + (get hyperparam_map "featureWeights") + ) feature_deviations (get hyperparam_map "featureDeviations") )) diff --git a/module/details.amlg b/module/details.amlg index b741f1975..d1de30b23 100644 --- a/module/details.amlg +++ b/module/details.amlg @@ -151,8 +151,7 @@ feature_deviations (get hyperparam_map "featureDeviations") feature_weights - ;only use featureMdaMap weights if there are action_features provided - (if (and (size (get hyperparam_map "featureMdaMap")) (size action_features)) + (if (size (get hyperparam_map "featureMdaMap")) (get hyperparam_map "featureMdaMap") (get hyperparam_map "featureWeights") ) diff --git a/unit_tests/ut_h_rebalance_features.amlg b/unit_tests/ut_h_rebalance_features.amlg index 6855f9028..ab9938307 100644 --- a/unit_tests/ut_h_rebalance_features.amlg +++ b/unit_tests/ut_h_rebalance_features.amlg @@ -353,7 +353,7 @@ ;geomean 0 ;weights of cases (order isn't relevant since distance/surprisal to each is same) - [1 2] + (normalize [1 2]) ) ))