Skip to Content
Advanced Machine Learning with R
book

Advanced Machine Learning with R

by Cory Lesmeister, Dr. Sunil Kumar Chinnamgari
May 2019
Intermediate to advanced
664 pages
15h 41m
English
Packt Publishing
Content preview from Advanced Machine Learning with R

Converting the DataFrame

We are going to use functions from an R library called recommenderlab to build recommendation engine projects in this chapter. Irrespective of the category of recommendation system we implement, there are some prerequisites that the dataset needs to satisfy to be able to apply the recommenderlab functions. The prebuilt recommenderlab functions for collaborative filtering expects realRatingMatrix to be supplied as input. In our case, the Jester5k dataset is already in this format, therefore, we could directly use this matrix to apply the recommenderlab functions.

In case, we were to have our data as a R DataFrame and if we intend to convert into realRatingMatrix, the following steps may be performed:

  1. Convert the DataFrame ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Machine Learning Using R

Machine Learning Using R

Karthik Ramasubramanian, Abhishek Singh
Machine Learning with R Cookbook - Second Edition

Machine Learning with R Cookbook - Second Edition

AshishSingh Bhatia, Yu-Wei, Chiu (David Chiu)
Practical Machine Learning in R

Practical Machine Learning in R

Fred Nwanganga, Mike Chapple

Publisher Resources

ISBN: 9781838641771Supplemental Content