How can I extract from Deepcheck's custom suite result the failed checks + exact "problematic" columns. In my example I had 2 failed checks 'Feature Drift' & 'Multivariate Drift'. For both checks the "problematic" columns were 'col_1' , 'col_5' and 'col_30'.
How using Python I can get something like this :
- Check 'Feature Drift' was failed because of : 'col_1' (Drift score = 0.9) , 'col_5'(Drift score = 0.7)
- Check 'Multivariate Drift' was failed because of : 'col_1' and 'col_30' with domain_classifier_drift_score = 0.85
My code is :
columns_metadata = {'cat_features' : categorical_cols, 'label':y_label_col }
train_dataset = Dataset(df = train_df , **columns_metadata)
test_dataset = Dataset(df = test_df , **columns_metadata )
custom_drift_suite = Suite('My_custom_drift_suite',
FeatureDrift().add_condition_drift_score_less_than( max_allowed_categorical_score=0.2, max_allowed_numeric_score=0.2),
at a time (can’t be recognized with Feature Drift)
MultivariateDrift().add_condition_overall_drift_value_less_than(0.4),
LabelDrift(),
NewCategoryTrainTest()train set )
)
custom_suite_ans = custom_drift_suite.run(train_dataset = train_dataset, test_dataset = test_dataset)
Thanks :) Boris