avgp {lago} | R Documentation |
Calculates the average precision of a ranking algorithm.
## 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)
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. |
Mu Zhu, University of Waterloo, Canada.