0

I am coding with R and trying to plot roc curve after randomForest classification :

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()

enter image description here as you can see x axes is in opposite direction!

rf.roc
Data: Votes in 557 controls (Y 0) < 120 cases (Y 1).
Area under the curve: 0.9966

I would appreciate it if someone could help me fix this

pegahT
  • 59
  • 1
  • 8

1 Answers1

0

This is the True Positive Rate (of those whom are classified positive how many are actually positive) versus the True Negative Rate (of those whom are classified negative how many are actually negative). The graph makes sense the way it is no?

BBlank
  • 58
  • 5