But when using multiclass target there is a ValueError for calculating roc_auc_score
ValueError Traceback (most recent call last)
/tmp/ipykernel_12526/2714231335.py in <module>
----> 1 oof_preds_woe, real_test_preds_woe = get_oof_and_test_pred(train[[*features, TARGET2]], test[[*features]])
/tmp/ipykernel_12526/1487485061.py in get_oof_and_test_pred(tr, real_te)
27 verbose=0)
28
---> 29 auto_woe.fit(X_tr, target_name=TARGET2)
30
31 val_pred = auto_woe.predict_proba(X_val)
~/raif/venv/lib/python3.8/site-packages/autowoe/lib/autowoe.py in fit(self, train, target_name, features_type, group_kf, max_bin_count, features_monotone_constraints, validation)
481
482 logger.info("Feature selection...")
--> 483 selector = Selector(interpreted_model=self.params['interpreted_model'],
484 train=self.train_df,
485 target=self.target,
~/raif/venv/lib/python3.8/site-packages/autowoe/lib/selectors/selector_last.py in __init__(self, interpreted_model, train, target, features_type, n_jobs, cv_split)
33 """
34 self.__features_fit = list(features_type.keys())
---> 35 self.__pearson_selector = ComposedSelector(train, target)
36 self.__main_selector = L1(train=train,
37 target=target,
~/raif/venv/lib/python3.8/site-packages/autowoe/lib/selectors/composed_selector.py in __init__(self, train, target)
38 cc = np.abs(sp.corrcoef(train.values, rowvar=False))
39 self.precomp_corr = pd.DataFrame(cc, index=train.columns, columns=train.columns)
---> 40 self.precomp_aucs = pd.Series([1 - roc_auc_score(target, train[x]) for x in train.columns],
41 index=train.columns)
42
~/raif/venv/lib/python3.8/site-packages/autowoe/lib/selectors/composed_selector.py in <listcomp>(.0)
38 cc = np.abs(sp.corrcoef(train.values, rowvar=False))
39 self.precomp_corr = pd.DataFrame(cc, index=train.columns, columns=train.columns)
---> 40 self.precomp_aucs = pd.Series([1 - roc_auc_score(target, train[x]) for x in train.columns],
41 index=train.columns)
42
~/raif/venv/lib/python3.8/site-packages/sklearn/metrics/_ranking.py in roc_auc_score(y_true, y_score, average, sample_weight, max_fpr, multi_class, labels)
557 )
558 if multi_class == "raise":
--> 559 raise ValueError("multi_class must be in ('ovo', 'ovr')")
560 return _multiclass_roc_auc_score(
561 y_true, y_score, labels, multi_class, average, sample_weight
ValueError: multi_class must be in ('ovo', 'ovr')