简体   繁体   中英

ROCR package in R: what do cutoffs mean?

I just installed the ROCR package in R, in order to calculate several performance measures such as accuracy, AUC, recall, precision, ...

However, when I calculate accuracy, I don't understand the meaning of the "cutoffs". The result is the following:

An object of class "performance"
Slot "x.name":
[1] "Cutoff"

Slot "y.name":
[1] "Accuracy"

Slot "alpha.name":
[1] "none"

Slot "x.values":
[[1]]
[1] Inf   2   1

Slot "y.values":
[[1]]
[1] 0.45 0.75 0.55

Slot "alpha.values":
list()

The second value from y.values , 0.75, is the actual accuracy of the model and the number that I want. But I don't understand why it is calculating 2 other accuracies? Can someone help?

If you can provide an actual example of your model, things would be easier to explain. Nevertheless, accuracy is measured as the ratio between the sum of true positives & negatives, and the total population. This calculation is always done at some cut-off or threshold. So when you have a cut-off of 2, you are getting an accuracy of 0.75. Similarly, with a cut-off value of 1, the accuracy of your model is dropping to 0.55. Have a look at this for a better understanding.

It is the best threshold (in accordance with certain metric) to define a probabily like a positive event . Thus, if the probability of an event is bigger than this cutoff, then the classifier will assign a "1" to the observation, else, a "0".

You can see a nice illustration here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM