2
$\begingroup$

I am building an algorithm that attempts to return relevant documents. If the query retrieves 10 documents but none are relevant how is the average precision calculated? Applying the AveP formula, it becomes an issue because it is divide by zero since the denominator is number of relevant documents.

$\endgroup$

1 Answer 1

1
$\begingroup$

The precision does not make sense if you have not retrieved any documents. If you need a value for the precision it should be null, or whatever you would like to use to indicate a missing value.

$\endgroup$
1
  • $\begingroup$ Documents are retrieved, but none are relevant. Does that clarify? $\endgroup$
    – Kevin
    Commented Jul 11, 2018 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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