-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Building a Recommendation System with R
By :
In this chapter, we will build recommender systems using recommenderlab, which is an R package for collaborative filtering. This section will present a quick overview of this package. First, let's install it, if we haven't done so already:
if(!"recommenderlab" %in% rownames(installed.packages())){install.packages("recommenderlab")}Now, we can load the package. Then, using the help function, we can take a look at its documentation:
library("recommenderlab")
help(package = "recommenderlab")When we run the preceding command in RStudio, a help file containing some links and a list of functions will open.
The examples that you will see in this chapter contain some random components. In order to be able to reproduce the code obtaining the same output, we need to run this line:
set.seed(1)
We are now ready to start exploring recommenderlab.
Like many other R packages, recommenderlab contains some datasets that can be used to play around with the functions...
Change the font size
Change margin width
Change background colour