Helper functions for discrete effectiveness distributions
Helper functions for discrete effectiveness distributions
These are functions to help in the creation and use of discrete effectiveness distributions.
matchTol(x, support, tol =1e-04)support(measure, runLength =1000)
Arguments
x: a vector of effectiveness scores.
support: the support of the distribution.
tol: tolerance for matching.
measure: the case insensitive name of the effectiveness measure. See Details.
runLength: the maximum number of documents retrieved for a query (defautls to 1000).
Returns
matchTol: an integer vector giving the position in the support of the match if there is a match, otherwise NA.
support: the support of the distribution of scores defined by the measure.
Details
matchTol returns a vector of the positions of matches of x in the vector of possible support values, within tolerance (see match). This is helpful when data are loaded from disk and possibly rounded or truncated.
support obtains the discrete support defined by an effectiveness measure given its name. Current measures are Reciprocal Rank ("RR"), and Precision at k ("P@k" or "Pk", where k is the cutoff, eg. "P@10" or "P10").