r - Add extra penalty for each FP -
i familiar rocr package, , used following code
library(rocr) data(rocr.simple) pred <- prediction( rocr.simple$predictions, rocr.simple$labels) perf <- performance(pred,"tpr","fpr") plot(perf)
but find optimal cutoff, need add penalty of 10 each fp
, , 100 each tn
how can using rocr package?
i guess, found answer
auc.tmp <- performance(res,"auc",cost.fp=100, cost.tn=10);
in way can costs each cell in confusion matrix, still looking way obtain cutoffs
Comments
Post a Comment