From 5b449e794c0da24036c7ffa20d8044a50a639f0c Mon Sep 17 00:00:00 2001 From: R-Palazzo Date: Thu, 6 Feb 2025 17:41:23 +0000 Subject: [PATCH] add metric_to_fix in parameters --- sdmetrics/single_table/data_augmentation/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdmetrics/single_table/data_augmentation/base.py b/sdmetrics/single_table/data_augmentation/base.py index f2cf75a7..9a6d6eaa 100644 --- a/sdmetrics/single_table/data_augmentation/base.py +++ b/sdmetrics/single_table/data_augmentation/base.py @@ -207,6 +207,7 @@ def compute_breakdown( fixed_recall_value, cls.metric_name, ) + metric_to_fix = 'recall' if cls.metric_name == 'precision' else 'precision' result = { 'real_data_baseline': trainer.get_scores( preprocessed_tables['real_training_data'], @@ -223,7 +224,7 @@ def compute_breakdown( 'prediction_column_name': trainer.prediction_column_name, 'minority_class_label': trainer.minority_class_label, 'classifier': trainer._classifier_name, - 'fixed_recall_value': trainer.fixed_value, + f'fixed_{metric_to_fix}_value': trainer.fixed_value, }, } result['score'] = max(