ValueError: Data is not binary and pos_label is not specified

后端 未结 2 1592
闹比i
闹比i 2021-01-07 18:57

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\"
         


        
2条回答
  •  心在旅途
    2021-01-07 19:03

    We have problem in y_true=np.array(['0', '1', '0', '0', '1', '1', '1', '1', '1']) Convert values of y_true to Boolean

    y_true= '1' <= y_true
    print(y_true) # [False  True False False  True  True  True  True  True]
    

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题