From 320a547c29c567667d8c61a1515add2fbca3fa7e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 27 May 2025 16:03:09 +0200 Subject: [PATCH] refactor(qav3): use scipy gmean MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../user_data/freqaimodels/QuickAdapterRegressorV3.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py index 7e0d167..b2fe5a5 100644 --- a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py +++ b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py @@ -469,10 +469,8 @@ class QuickAdapterRegressorV3(BaseRegressionModel): ) ) elif metric == "geometric_mean": - # 1.0 = np.prod(ideal_point) ** (1.0 / ideal_point.shape[0]) - return 1.0 - np.prod(normalized_matrix, axis=1) ** ( - 1.0 / normalized_matrix.shape[1] - ) + # 1.0 = sp.stats.gmean(ideal_point) + return 1.0 - sp.stats.gmean(normalized_matrix, axis=1) elif metric == "hypervolume": # 1.0 = np.prod(ideal_point) return 1.0 - np.prod(normalized_matrix, axis=1) -- 2.43.0