avgp {lago}R Documentation

Average Precision

Description

Calculates the average precision of a ranking algorithm.

Usage

## use default LAGO to rank items
obj <- sLago(Y,X)
s <- rank.sLago(obj, Xnew)

## evaluate its performance by average precision
avgp(y=Ynew, phat=s, ties=T)

Arguments

y a vector of binary responses.
phat a vector of rankings. Often, one may want to use posterior probabilities to rank items, but any monotonic transformation of posterior probabilities will, of course, give the same ranking.
ties if TRUE, ties are 'equalized' (more computation); otherwise, ties are broken at random.

Author(s)

Mu Zhu, University of Waterloo, Canada.

See Also

topn, tuneLago


[Package lago version 0.1-1 Index]