This resource is a collection of jupyter notebook examples to provide end-to-end examples for NVIDIA Merlin.
Getting Started MovieLens: Download and Convert
MovieLens25M
The MovieLens25M is a popular dataset for recommender systems and is used in academic publications. The dataset contains 25M movie ratings for 62,000 movies given by 162,000 users. Many projects use only the user/item/rating information of MovieLens, but the original dataset provides metadata for the movies, as well. For example, which genres a movie has. Although we may not improve state-of-the-art results with our neural network architecture in this example, we will use the metadata to show how to multi-hot encode the categorical features.
Download the dataset
We define our base input directory, containing the data.
We will download and unzip the data.
Convert the dataset
First, we take a look on the movie metadata.
We can see, that genres are a multi-hot categorical features with different number of genres per movie. Currently, genres is a String and we want split the String into a list of Strings. In addition, we drop the title.
We save movies genres in parquet format, so that they can be used by NVTabular in the next notebook.
Splitting into train and validation dataset
We load the movie ratings.
We drop the timestamp column and split the ratings into training and test dataset. We use a simple random split.
We save the dataset to disk.