Precision
Main article: Precision and recall
Precision is the fraction of the documents retrieved that are relevant to the user’s information need.
In binary classification, precision is analogous to positive predictive value. Precision takes all retrieved documents into account. It can also be evaluated at a given cut-off rank, considering only the topmost results returned by the system. This measure is called precision at n or P@n.
Note that the meaning and usage of “precision” in the field of information retrieval differs from the definition of accuracy and precision within other branches of science and statistics.
Recall
Main article: Precision and recall
Recall is the fraction of the documents that are relevant to the query that are successfully retrieved.
In binary classification, recall is often called sensitivity. So it can be looked at as the probability that a relevant document is retrieved by the query.
It is trivial to achieve recall of 100% by returning all documents in response to any query. Therefore, recall alone is not enough but one needs to measure the number of non-relevant documents also, for example by computing the precision.
Average precision
Precision and recall are single-value metrics based on the whole list of documents returned by the system. For systems that return a ranked sequence of documents, it is desirable to also consider the order in which the returned documents are presented. By computing a precision and recall at every position in the ranked sequence of documents, one can plot a precision-recall curve, plotting precision
p(r)
as a function of recall
r
. Average precision computes the average value of
p(r)
over the interval from
r=0
to
r=1
That is the area under the precision-recall curve. This integral is in practice replaced with a finite sum over every position in the ranked sequence of documents:
AveP=∑k=1nP(k)Δr(k)
where
k
is the rank in the sequence of retrieved documents,
n
is the number of retrieved documents,
P(k)
is the precision at cut-off
k
in the list, and
Δr(k)
is the change in recall from items
k−1
to
k
This finite sum is equivalent to:
Mean average precision
Mean average precision for a set of queries is the mean of the average precision scores for each query.
where Q is the number of queries.
参考wiki:
https://en.wikipedia.org/wiki/Information_retrieval#Precision