'ROC score doesn't work for the UBCF model (in R)

Hello I'm using recommender lab to get recommendations on movies. I'm trying to compare models with each others, with the Roc score. A loop has been made but for the UBCF model it doesn't work here is the error :

Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 't': not-yet-implemented method for %% .*

Here is the code :

rr <- Recommender(r3[1:500], method = "POPULAR")
recom <- predict(rr, r3[1], n=5)

scheme <- evaluationScheme(r3[1:500], method="split", train=0.8, k=1, given=8, goodRating=3.5)

algorithms <- list("random items" = list(name="RANDOM", param=NULL), 
                   "popular items" = list(name="POPULAR", param=NULL), 
                   "user-based CF" = list(name="UBCF", param=list(nn=50)), 
                   "item-based CF" = list(name="IBCF", param=list(k=50)), 
                   "SVD approximation" = list(name="SVD", param=list(k=50)))

results <- evaluate(scheme, algorithms, type="topNList", n=c(1, 3, 5, 10, 15, 20))

plot(results, annotate=c(1,3), legend="bottomright")

Thank you for your help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source