Reputation: 91
I got question about CatBoostClassifier.
params = {
'loss_function' : 'Logloss',
'eval_metric' : 'AUC',
'verbose' : 200,
'random_seed' : 42,
'custom_metric' : 'AUC:hints=skip_train~false'
}
cbc = CatBoostClassifier(**params)
cbc.fit(x_tr, y_tr,
eval_set = (x_te, y_te),
use_best_model = True,
plot = True
);
predictions = cbc.predict(x_te)
Model results:
bestTest = 0.6786987522
But when I try :
from sklearn import metrics
auc = metrics.roc_auc_score(y_te, predictions)
auc
I got 0.5631684491978609
result. Why this results differ ? What first and second result mean ? Which one is final metric of my cbc model ?
Upvotes: 0
Views: 6375
Reputation: 91
OK, I found solution. I should use:
predictions = cbc.predict_proba(x_te)
rather than
predictions = cbc.predict(x_te)
Now I have the same results.
Upvotes: 6