我正在用 R 编码并尝试在 randomForest 分类后绘制 roc 曲线:
rf.roc<- roc(Y , Votes)
file1=paste( "cv_average", Cancer,".AUC.RF" , ".pdf" , sep="" )
pdf(file=file1 ,width = 5 , height = 5 )
plotRF<-plot.roc(rf.roc,main=paste(Cancer , " vs. others", " average of cv RF" , sep="")
,col=1,lwd=4, cex.lab=1.5 , cex.main=1.1 , cex.lab=1.1)
text(x=0.7 , y=0.65 , label=paste("mean_accuracy=" , round(acc.RF , digits = 4) , sep="") , cex=1 ,font=2)
text(x=0.7 , y=0.8 ,label=paste("AUC= ",round( auc(rf.roc), digits = 4) , sep = "") , cex=1 , font=2 )
print(plotRF)
dev.off()
rf.roc
Data: Votes in 557 controls (Y 0) < 120 cases (Y 1).
Area under the curve: 0.9966
如果有人能帮我解决这个问题,我将不胜感激
答案 0 :(得分:0)
这是真阳性率(被归类为阳性的人中有多少实际上是阳性的)与真阴性率(被归类为阴性的人中有多少实际上是阴性的)。图表是否有意义?