I have some models, using ROCR
package on a vector of the predicted class percentages, I have a performance object. Plotting the performance object with the specifications "tpr", "fpr" gives me a ROC curve.
I'm comparing models at certain thresholds of false positive rate (x). I'm hoping to get the value of the true positive rate (y) out of the performance object. Even more, I would like to get the class percentage threshold that was used to generate that point.
the index number of the false positive rate (x-value
) that is closest to the threshold without being above it, should give me the index number of the appropriate true positive rate (y-value
). I'm not exactly sure how to get that index value.
And more to the point, how do i get the threshold of class probabilities that was used to make that point?
See Question&Answers more detail:os