Re: [R] ROCR package finding maximum accuracy and optimal cutoff point

2009-03-28 Thread Saeed Abu Nimeh
Found the solution to my own question. To find the false positive rate and the false negative rate that correspond to a certain cutoff point using the ROCR package, one can do the following (for sure there is simpler ways, but this works): library(ElemStatLearn) library(rpart) data(spam)

[R] ROCR package finding maximum accuracy and optimal cutoff point

2009-03-26 Thread Saeed Abu Nimeh
If we use the ROCR package to find the accuracy of a classifier pred - prediction(svm.pred, testset[,2]) perf.acc - performance(pred,acc) Do we find the maximum accuracy as follows (is there a simplier way?): max(perf@x.values[[1]]) Then to find the cutoff point that maximizes the accuracy