Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


simIReff (version 1.0)

effTransform: Transform effectiveness distributions towards a expected value

Description

Transforms the given effectiveness distribution such that its expected value matches a predefined value. For details, please refer to section 3.4 of (Urbano and Nagler, 2018).

Usage

effTransform(eff, mean, abs.tol = 1e-05)

effTransformAll(effs, means, abs.tol = 1e-05, silent = TRUE)

Arguments

eff

the distribution to transform.

mean

the target expected value to transform to. If missing, defaults to the mean in the data used to fit eff, if any.

abs.tol

the absolute tolerance of the transformation.

effs

the list of distributions to transform.

means

the vector of target expected values to transform to. If missing, defaults to the means in the data used to fit effs, if any.

silent

logical: should the report of error messages be suppressed?

Value

an effectiveness distribution of class eff.cont.trans or eff.disc.trans, depending on the type of distribution.

Details

effTransformAll does the same but for a list of distributions and target means.

References

J. Urbano and T. Nagler. (2018). Stochastic Simulation of Test Collections: Evaluation Scores. ACM SIGIR.

Examples

Run this code
# NOT RUN {
e <- effCont_beta(web2010ap[,1])
e2 <- effTransform(e, 0.12)
c(e$mean, e2$mean)
plot(e)
plot(e2)

# }
# NOT RUN {
# transform a list of distributions to the observed means
ee <- effContFitAndSelect(web2010ap[,1:5])
ee2 <- effTransformAll(ee)
obsmeans <- colMeans(web2010ap[,1:5])
sapply(ee, function(e)e$mean) - obsmeans
sapply(ee2, function(e)e$mean) - obsmeans
# }

Run the code above in your browser using DataLab