I'm doing 10-fold cross validation on a dataset. But in some folds there are edge cases that the denominator in precision-recall calculation is zero (tp + fp =0).

What are the correct values for precision and recall in this case? And what is the correct way of doing cross-validation (should I include these results when reporting average precision-recall over 10 folds)?

PS: This question is very similar to What are correct values for precision and recall when the denominators equal 0?

Thanks in advance : -)


Instead of using CV to estimate precision and recall, use it to obtain the expected TP, TN, FP, and FN rate. Then use those values to compute the expected precision and recall and the standard errors. (Taylor expansions come in handy for the latter.)

  • 1
    $\begingroup$ Thanks charles. Any reference or reason why this approach is better ? $\endgroup$ – ablimit Apr 9 '11 at 23:31
  • $\begingroup$ @ablimit Your problem will just likely average out =) $\endgroup$ – user88 Apr 11 '11 at 11:05
  • $\begingroup$ With this approach you mean to compute TP, TN, FP and FN and then sum them out over all the cross validation folds? $\endgroup$ – papafe Oct 12 '14 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.