Skip to content

Commit

Permalink
Determine correct stattest for descriptors. (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liraim authored Jun 20, 2024
1 parent b30747c commit 3fee32d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/evidently/metrics/data_drift/column_drift_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,17 @@ 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

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

Expand Down

0 comments on commit 3fee32d

Please sign in to comment.