0

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?

vdvaxel
  • 667
  • 1
  • 14
  • 41

2 Answers2

0

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.

Community
  • 1
  • 1
Dhiraj
  • 1,650
  • 1
  • 18
  • 44
0

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

Community
  • 1
  • 1
Mario
  • 5
  • 1