G***G 发帖数: 16778 | 1 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. | N******n 发帖数: 3003 | 2 tumor>normal
1>0,
你把本来的1,0 给翻了个因为tumor 当中1, normal 为0.
【在 G***G 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 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"
| G***G 发帖数: 16778 | 3 but why can we not label arbitrarily?
the prediton and label corresponds with each other very good.
evern our eyes can find the relationship.
【在 N******n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : tumor>normal : 1>0, : 你把本来的1,0 给翻了个因为tumor 当中1, normal 为0.
| l**********1 发帖数: 5204 | 4 那需要你自己更新一下那个源程序喽 R
ps: it is not free lunch if you want other do that.
USD or funding share might needed.
【在 G***G 的大作中提到】![](/moin_static193/solenoid/img/up.png) : but why can we not label arbitrarily? : the prediton and label corresponds with each other very good. : evern our eyes can find the relationship.
|
|