Table of Contents
The purpose of this repository is to enhance explainability of sequential recommender models with SHAP values. We currently use 2 packages for this - [Rechorus](https://github.com/THUwangcy/ReChorus): A general PyTorch framework for Top-K recommendation with implicit feedback - [TimeSHAP](https://github.com/feedzai/timeshap): A model-agnostic, recurrent explainer that builds upon KernelSHAP and extends it to the sequential domain. TimeSHAP computes event/timestamp- feature-, and cell-level attributions. In this repository, we have chosen GRU4Rec as the sequential recommender system and provided a local level explanations of a few interactions on MovieLens 1m dataset. pip install -r requirements.txt
git clone https://github.com/maneelusf/extpersonalization
cd src
python argcorpus.py --model_name GRU4Rec --emb_size 64 --lr 1e-3 --l2 1e-6 --dataset Grocery_and_Gourmet_Food python main.py --model_name GRU4Rec --emb_size 64 --lr 1e-3 --l2 1e-6 --dataset Grocery_and_Gourmet_Food
cd ../Notebooks
After training a model, we can run the following the [notebook] (https://github.com/maneelusf/extpersonalization/blob/main/notebooks/Notebook%20to%20generate%20top%20K%20recommendations.ipynb)to generate SHAP values. Reach out to the maintainer at one of the following places: |