evalrec: Evaluates the requested recommendation algorithm.

evalRecR Documentation

Evaluates the requested recommendation algorithm.

Description

Evaluates the recommendation task of an algorithm with a given configuration and based on the given evaluation model.

Arguments

model

Object of type evalModel. See evalModel-class.

alg

The algorithm to be used in the evaluation. Of class character.

topN

Object of class numeric, specifying the number of items to be recommended per user.

topNGen

Object of class character, specifying the function used to produce the recommendations. Values: "hpr" and "mf" (currently available only for IB and UB methods).

positiveThreshold

Object of class numeric, indicating the threshold of the ratings to be considered a good. This attribute is not used when evaluating implicit feedback.

alpha

Object of class numeric, is the half-life parameter for the rankscore metric.

...

other attributes specific to the algorithm to be deployed. Refer to rrecsys.

Value

Returns an object of class evalRecResults with the precision, recall, F1, nDCG, RankScore, true positives(TP), false positives(FP), true negatives(TN), false negatives(FN) for each of the k-folds defined in the evaluation model and the overall average.

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

evalModel-class, rrecsys, evalRecResults-class.

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 <- evalRec(e, "FunkSVD", positiveThreshold = 4, k = 4) 
  
  SVDEvaluation         
  
  
  

ludovikcoba/rrecsys documentation built on May 17, 2022, 2:33 a.m.