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
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 flipped. How do we know which order of labels we should choose? Is this a bug of ROC? thank you very much. Mike