This repository contains the files and datasets used for the kaggle competition of the recommender systems course at Politecnico di Milano. The competition took place from November 2021 till January 2022.
The application domain of the competition was TV show recommendation. Starting from a sparse User Rating Matrix with implicit feedback and an Item Content Matrix with information on the genre, subgenre and diffusion channels of each tv show, we had to recommend 10 relevant TV shows for each user. The quality of the recommender was evaluated with the MAP@10 metric.
The final model is a 2-level hybrid recommender which averages the prediction of six different base recommenders. Please refer to the presentation slide deck for more details.
This repo contains the implementation of the following base recommenders :
- User based Collaborative Filtering
- Item Content Based Filtering
- P3alpha and RP3Beta Graph Based models
- Pure SVD
- iALS
- Slim BPR
- EASER Recommender
The recommenders come from the course repository.
This repository requires Python 3.8. Requirements and dependencies can be installed using the following command.
pip install -r requirements.txt
Some of the models use Cython implementations. As written in the original repository you have to compile all Cython algorithms. In order to compile you must first have installed: gcc and python3 dev. Under Linux those can be installed with the following commands:
sudo apt install gcc
sudo apt-get install python3-dev
If you are using Windows as operating system, the installation procedure is a bit more complex. You may refer to the official guide.
Now you can compile all Cython algorithms by running the following command. The script will compile within the current active environment. The code has been developed for Linux and Windows platforms. During the compilation you may see some warnings.
python run_compile_all_cython.py
- 30 out of 30 points
- MAP@10 : 0.48549