在scikit learn中,GridSearchCV()支持'roc_auc‘作为评分函数。它在n折交叉验证中工作得很好,但是如果我使用LeaveOneOut,它就不能工作并生成错误消息。ROC AUC score is not defined in that case.
虽然使用AUC绘制只有一个样本似乎是不可能的,但其他语言,如R,支持LeaveOneOut的roc_auc。如何使用python和scikit-lear
但是,当使用roc_auc_score计算AUC时,我得到了以下错误:
"ValueError: Only one class present in y_true.因此,sklearn的roc_auc_score函数报告了唯一的一类问题。这是合理的。但是我很好奇,因为当我使用sklearn的cross_val_score函数时,它可以毫无错误地处理AUC的计算</
我试图计算快速文本训练模型的ROC和AUC,但是我总是得到错误的ValueError: Found input variables with inconsistent numbers of samples= roc_auc_score(testy, probabilities)编辑了,我无法解决的问题是计算ROC & AUC,因