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.



Try the rrecsys package in your browser

Any scripts or data that you put into this service are public.

rrecsys documentation built on June 10, 2019, 1:02 a.m.