March 2019
Beginner to intermediate
464 pages
10h 57m
English
The data we have now represents individual items purchased by customers. However, in order to build a product recommendation system with a collaborative filtering algorithm, we need to have data where each record contains information on which item each customer has bought. In this section, we are going to transform the data into a customer-item matrix, where each row represents a customer and the columns correspond to different products.
In order to transform our data into a customer-item matrix, we are going to use the dcast function in the reshape2 package. If you do not already have this package installed in your R environment, you can run the following commands to install and include this package in your ...
Read now
Unlock full access