Nicolas Hug created Surprise [http://surpriselib.com], which implements a number of thecollaborative filtering algorithms we will use here. I am using version 1.1.0 of the library. To download the same version of the library via pip, you can run the following command in your terminal:
pip install -U scikit-surprise==1.1.0
Before using the library, we also need to download the dataset used in this chapter.
Downloading the KDD Cup 2012 dataset
We are going to use the same dataset that we used in Chapter 10, Imbalanced Learning – Not Even 1% Win the Lottery. The data is published on the OpenML platform. It contains a list of records. In each record, a user has seen an online advertisement, and there is an additional column stating whether the user clicked on the advertisement. In the aforementioned chapter, we built a classifier to predict whether the user clicked on the advertisement...