I am trying to calculate roc_auc_score
, but I am getting following error.
"ValueError: Data is not binary and pos_label is not specified"
My code snippet is as follows:
import numpy as np
from sklearn.metrics import roc_auc_score
y_scores=np.array([ 0.63, 0.53, 0.36, 0.02, 0.70 ,1 , 0.48, 0.46, 0.57])
y_true=np.array(['0', '1', '0', '0', '1', '1', '1', '1', '1'])
roc_auc_score(y_true, y_scores)
Please tell me what is wrong with it.