evalPred {rrecsys} | R Documentation |
Evaluates the requested prediction algorithm.
Description
Evaluates the prediction task of an algorithm with a given configuration and based on the given evaluation model. RMSE and MAE are both calculated individually for each user and then averaged over all users (in this case they will be referred as RMSE and MAE) as well as determined as the average error over all predictions (in this case they are named globalRMSE and globalMAE).
Usage
evalPred(model, ...)
## S4 method for signature 'evalModel'
evalPred(model, alg, ... )
Arguments
model |
Object of type |
alg |
The algorithm to be used in the evaluation. Of type |
... |
other attributes specific to the algorithm to be deployed. Refer to |
Value
Returns a data frame with the RMSE
, MAE
, globalRMSE
and globalMAE
for each of the k-folds defined in the evaluation model and an average over all folds.
References
F. Ricci, L. Rokach, B. Shapira, and P. B. Kantor, editors. Recommender Systems Handbook. Springer, 2011. ISBN 978-0-387-85819-7. URL http://www.springerlink.com/content/978-0-387-85819-7.
See Also
Examples
x <- matrix(sample(c(0:5), size = 200, replace = TRUE,
prob = c(.6,.8,.8,.8,.8,.8)), nrow = 20, byrow = TRUE)
x <- defineData(x)
e <- evalModel(x, 2)
SVDEvaluation <- evalPred(e, "FunkSVD", k = 4)
SVDEvaluation
IBEvaluation <- evalPred(e, "IBKNN", simFunct = "cos", neigh = 5, coRatedThreshold = 2)
IBEvaluation