### this takes a while to run
## Not run:
# data("Jester5k")
#
# train <- as(Jester5k[1:100], "matrix")
# fsvd <- funkSVD(train, verbose = TRUE)
#
# ### reconstruct the rating matrix as R = UV'
# ### and calculate the root mean square error on the known ratings
# r <- tcrossprod(fsvd$U, fsvd$V)
# rmse(train, r)
#
# ### fold in new users for matrix completion
# test <- as(Jester5k[101:105], "matrix")
# p <- predict(fsvd, test, verbose = TRUE)
# rmse(test, p)
# ## End(Not run)
Run the code above in your browser using DataLab