Mean Average Precision(MAP)

来源:互联网 发布:海典医药软件 编辑:程序博客网 时间:2024/06/05 19:30

Precision
Main article: Precision and recall
Precision is the fraction of the documents retrieved that are relevant to the user’s information need.

precision=|{relevant documents}{retrieved documents}||{retrieved documents}|

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.

recall=|{relevant documents}{retrieved documents}||{relevant documents}|

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 precisionp(r) as a function of recallr . Average precision computes the average value of p(r) over the interval fromr=0 to r=1

AveP=10p(r)dr

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)
wherekis 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 k1 to k

This finite sum is equivalent to:

AveP=nk=1(P(k)×rel(k))number of relevant documents

Mean average precision
Mean average precision for a set of queries is the mean of the average precision scores for each query.

MAP=Qq=1AveP(q)Q

where Q is the number of queries.

参考wiki:
https://en.wikipedia.org/wiki/Information_retrieval#Precision

0 0