May 2019
Intermediate to advanced
664 pages
15h 41m
English
Another prerequisite is to divide the dataset into train and test subsets. These subsets will be used in later sections to implement our recommendation systems and to measure the performance. The evaluationScheme() function from the recommenderlab library can be used to split the dataset into training and testing subsets. A number of user-specified parameters can be passed to this function. In the following code, realRatingMatrix is split according to an 80/20 training/testing split, with up to 20 items recommended for each user. Furthermore, we specify that any rating greater than 0 is to be considered a positive rating, in conformance with the predefined [-10, 10] rating scale. The Jester5k dataset can be divided ...