Blogger

Delete comment from: One R Tip A Day

Paolo said...

Usando la base graphics di R, fornendo le coordinate per test and training che io ho chiamato rispettivamente (1-tn,tf) e (1-tn2, tf2) e plottando il caso random con abline dovresti riuscire ad ottenere il grafico:

plot(1-test$tn2,test$tp2,type="l",xlim=c(0,1), ylim=c(0,1), col="grey50", lwd=2, xlab="Specificity", ylab="Sensitivity")
lines(1-test$tn,test$tp,type="l", col="grey70", lwd=2)
abline(a=0,b=1,col="black", lwd=2)
legend("topleft",legend=c("test","training", "random"),col=c("gray50","gray70","black"),lwd=2)

Mar 22, 2010, 9:43:29 PM


Posted to Receiver Operating Characteristic (ROC) Curve in ROCR and verification packages

Google apps
Main menu