Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. from sklearn.metrics import roc_auc_score
  2. from sklearn import preprocessing
  3.  
  4. # Use trained model to predict output of test dataset
  5. val = xgb.predict(X_test)
  6.  
  7. lb = preprocessing.LabelBinarizer()
  8. lb.fit(y_test)
  9.  
  10. y_test_lb = lb.transform(y_test)
  11. val_lb = lb.transform(val)
  12.  
  13. roc_auc_score(y_test_lb, val_lb, average='macro')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement