GithubHelp home page GithubHelp logo

causal-recsys-public's Introduction

Reference implementation of the deconfounded recommender

This folder contains the code for Causal Inference on Recommender Systems (Wang et al., 2020):

  • the empirical study on simulated datasets (Section 3.2)

  • the empirical study on random test sets (Section 3.3)

Environment

python 2

tensorflow 1.5.0

edward 1.3.5

How to execute the scripts

Download the datasets

Download the Yahoo R3 dataset and the coat dataset to dat/raw/

Preprocess the datasets

Yahoo R3

Run the script src/preproc/prep_R3_weakgen.py and src/preproc/prep_R3_stronggen.py to preprocess the dataset.

Coat (Schnabel et al., 2016)

Run the script src/preproc/prep_coat_weakgen.py and src/preproc/prep_coat_stronggen.py to preprocess the dataset.

Simulated datasets

Run the script src/simdat/simulate_generic.py to simulate the datasets.

Run the script src/preproc/prep_simulate_weakgen.py and src/preproc/prep_simulate_stronggen.py to preprocess the dataset.

Perform recommendation

Yahoo R3

Run the script src/causalrec/run_sweep_R3_fitA.sh and then src/causalrec/run_sweep_R3.sh to perform recommendation.

Coat (Schnabel et al., 2016)

Run the script src/causalrec/run_sweep_coat_fitA.sh and then src/causalrec/run_sweep_coat.sh to perform recommendation.

Simulated datasets

Run the script src/causalrec/run_sweep_simulation_fitA.sh and then src/causalrec/run_sweep_simulation.sh to perform recommendation.

Aggregate results

Run the script src/causalrec/merge_csv.py to aggregate results.

Output

The files res/*_allres.csv include output from this implementation.

References

Y. Wang, D. Liang, L. Charlin, and D.M. Blei. (2020) Causal inference on recommender systems. Proceedings of the 14th ACM Conference on Recommender Systems.

Tobias Schnabel, Adith Swaminathan, Ashudeep Singh, Navin Chandak, Thorsten Joachims (2016). Recommendations as Treatments: Debiasing Learning and Evaluation. Proceedings of The International Conference on Machine Learning (ICML).

causal-recsys-public's People

Contributors

yixinwang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.