effDisc-helper: Helper functions for discrete effectiveness distributions

Description Usage Arguments Details Value See Also Examples

Description

These are functions to help in the creation and use of discrete effectiveness distributions.

Usage

1
2
3
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).

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 ("[email protected]" or "Pk", where k is the cutoff, eg. "[email protected]" or "P10").

Value

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.

See Also

eff.disc.

Examples

1
2
3
4
5
6
7
support("rr")
support("rr", runLength = 10)
support("[email protected]")
support("p20")

(i <- matchTol(c(.1, .4, .41, .40001), support("p10")))
support("p10")[i]

julian-urbano/simIReff documentation built on July 17, 2018, 2:12 a.m.