【发布时间】:2012-12-09 09:50:39
【问题描述】:
我有一个 csv 文件(制表符分隔),其中包含 2 列,看起来像这样
5 0
6 0
9 0
8 1
"+5000 lines similar lines"
我正在尝试使用 ROCR 创建 ROC 图。
这是我迄今为止尝试过的:
p<-read.csv(file="forROC.csv", head=TRUE, sep="\t")
pred<-prediction(p[1],p[2])
第二行给我一个错误:Error in prediction(p[1], p[2]) : Number of classes is not equal to 2.
ROCR currently supports only evaluation of binary classification tasks.
我不确定错误是什么。我的 CSV 文件有问题吗?
【问题讨论】: