Hi There,

I  don't understand how to order the label in ROCR package in order to
get the correct result. I am wondering whether you can help me.

library(ROCR)
data(ROCR.simple)
pred <- prediction(ROCR.simple$predictions,ROCR.simple$labels)
svm.auc <- performance(pred, 'tpr', 'fpr')
plot(svm.auc)

#####label 
ROCR.simple$labels[ROCR.simple$labels=="0"]="tumor"
ROCR.simple$labels[ROCR.simple$labels==1]="normal"

pred <- prediction(ROCR.simple$predictions,ROCR.simple$labels)

svm.auc <- performance(pred, 'tpr', 'fpr')

plot(svm.auc)

The ROC curve is fliped. How do we know which order of labels we should choose?

Is this a bug of ROC?

thank you very much.

Mike

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to