Processing the input
The input ratings file records in each row contain the fields userId, movieId, rating, and timestamp. We process each record to create a training file in the form of a numpy array with the three dimensions pertaining to the userId, the movieId, and the rating. The ratings from one to five are one-hot encoded, and hence the length along the rating dimension is five. We create the training data with 80% of the input records while the remaining 20% is reserved for test purposes. The number of movies that the users have rated is 1682. The training file contains 943 users and hence the dimension for the training data is (943,1682,5). Each user in the training file is a training record to the RBM and will contain a few movies ...
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.
Read now
Unlock full access