From 3fee32d097dad1c6b69024b195363d58a7048523 Mon Sep 17 00:00:00 2001 From: Vyacheslav Morov Date: Thu, 20 Jun 2024 19:52:44 +0100 Subject: [PATCH] Determine correct stattest for descriptors. (#1164) --- src/evidently/metrics/data_drift/column_drift_metric.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/evidently/metrics/data_drift/column_drift_metric.py b/src/evidently/metrics/data_drift/column_drift_metric.py index 69bfedf245..a8242e5ae6 100644 --- a/src/evidently/metrics/data_drift/column_drift_metric.py +++ b/src/evidently/metrics/data_drift/column_drift_metric.py @@ -56,7 +56,6 @@ def get_one_column_drift( target = data_definition.get_target_column() stattest = None - threshold = None if column.is_main_dataset(): if target and column.name == target.column_name and column_type == ColumnType.Numerical: stattest = options.num_target_stattest_func @@ -64,10 +63,10 @@ def get_one_column_drift( elif target and column.name == target.column_name and column_type == ColumnType.Categorical: stattest = options.cat_target_stattest_func - if not stattest: - stattest = options.get_feature_stattest_func(column.name, column_type.value) + if not stattest: + stattest = options.get_feature_stattest_func(column.name, column_type.value) - threshold = options.get_threshold(column.name, column_type.value) + threshold = options.get_threshold(column.name, column_type.value) current_column = current_feature_data reference_column = reference_feature_data