Skip to content

Commit

Permalink
add metric_to_fix in parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Palazzo committed Feb 6, 2025
1 parent fbc5d37 commit 5b449e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdmetrics/single_table/data_augmentation/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand All @@ -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(
Expand Down

0 comments on commit 5b449e7

Please sign in to comment.