0

I use ROCR package in R to calculate Precision-recall break-even point. But surprisingly, it gives negative results sometimes. As I know, it is impossible for prbe to be negative.

What can be the problem?

For example prbe is -6.938894e-17 while auc is 0.8171971

I calculate it as follows,

pr = prediction(preds, labs)

auc = performance(pr, 'auc')@y.values[[1]]

prbe = performance(pr, 'prbe')
prbe = prbe@y.values[[1]][ length( prbe@y.values[[1]] ) ]
ibilgen
  • 460
  • 1
  • 7
  • 15

1 Answers1

1

A value of -6.938894e-17 is zero to the limits of precision, which IIRC is the floor to the possible values of PRBE. See, for example, this previous SO question on floating-point comparison.

Now whether it makes sense for PRBE to be 0 on your data is another issue....

Community
  • 1
  • 1
Hong Ooi
  • 56,353
  • 13
  • 134
  • 187
  • So 0.15 is not equal to 0.1 + 0.05 in computers using IEEE floating point arithmetic , interesting.. Thanks for the information. Let me have a look why my model result value of 0 for prbe.. – ibilgen Jul 03 '13 at 12:19