Predicting & recommending

Once a model has been trained rrecsys may be used to generate either recommendation or predictions.

The prediction method will generate a new rating matrix with estimations on the missing ratings. Let’s predict using two models trained in the previous vignettes:

pSVD <- predict(svd)
pIB <- predict(ibknn)

The predict method has a second argument, Round that rounds predicted values to the scale and binds them to the domain of the data set.

The recommend method generates a top-N list for each user:

rSVD <- recommendHPR(svd, topN = 3)
rIB <- recommendHPR(ibknn, topN = 3)
# Let’s compare results on user 3:
rSVD[4]
rIB[4]

The topN argument specifies the length of the recommended list for each user.