Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sklearn.metrics import roc_auc_score
- from sklearn import preprocessing
- # Use trained model to predict output of test dataset
- val = xgb.predict(X_test)
- lb = preprocessing.LabelBinarizer()
- lb.fit(y_test)
- y_test_lb = lb.transform(y_test)
- val_lb = lb.transform(val)
- roc_auc_score(y_test_lb, val_lb, average='macro')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement