This is a utility package for the course SMEMI315: Building Recommender systems taught at the Université Côte d'Azure in autumns of 2021 and 2022. See the course description for more info about its content.
First, install Docker on your system. Then:
docker build -t recommender-systems-course https://github.com/inpefess/recommender-systems-course.git
docker run -it --rm -p 8888:8888 recommender-systems-course jupyter-lab --ip=0.0.0.0 --port=8888
You can also try it on MyBinder (it's a free system, so resources are not always available).
This includes Google Colab, Kaggle, and VertexAI Workbench.
pip install git+https://github.com/inpefess/recommender-systems-course.git
Depending on your environment (this is a known issue on VertexAI Workbench, for example), you should add other parameters to this command.
PATH=/home/jupyter/.local/bin:$PATH; pip install --user git+https://github.com/inpefess/recommender-systems-course.git
There are two options:
Use Windows Subsystem for Linux (WSL)
On WSL, proceed as on any Linux.
Use Anaconda
# get the source git clone git+https://github.com/inpefess/recommender-systems-course.git cd recommender-systems-course # use a provided environment configuration conda env create -n recommender-systems-course -f environment.yml python=3.8 conda activate recommender-systems-course # test that all installed correctly pytest # add ``rs_course`` package pip install . # start working jupyter lab
Should be in principle installable in a similar way as on Linux, but not tested.
This package is supposed to be used together with rs_datasets
:
from rs_datasets import MovieLens
ratings = MovieLens("small").ratings
The package contains pre-packed examples of different recommenders.
For example, this function computes hit-rate@1
of a PureSVD
trained with default parameteres from scikit-learn
on randomly
selected 80% of ratings:
from rs_course.cf_svd import pure_svd_recommender
pure_svd_recommender(
ratings=ratings,
split_test_users_into=1,
model_config={},
top_k=1,
train_percentage=0.8
)
More detailed documentation is available here.
This package is not supposed to be used as a recommender systems library. It's only purpose is to help a complete beginner to get the taste of the recommenders' world. For a proper library, try something from this list.
If you want to cite this package in your research paper, please use the following DOI.