Giter Site home page Giter Site logo

ningjingzhang / pytorch-irgan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iyiyaha/pytorch-irgan

0.0 0.0 0.0 1.7 MB

PyTorch-IRGAN is a PyTorch version implementation of the item recommendation part of IRGAN.

Jupyter Notebook 99.73% Python 0.27%

pytorch-irgan's Introduction

PyTorch-IRGAN

Description

This project contains a pytorch version implementation about the item recommendation part of IRGAN: A Minimax Game for Unifying Generative and Discriminative Information Retrieval Models. The official implementation can be found at https://github.com/geek-ai/irgan. If you have any problems on this implementation, please open an issue.

Requirements

Please refer to requirements.txt

Project Structure

.
├── config.py (Configurations about IRGAN and BPR.)
├── data (Data Files)
│   ├── movielens-100k-test.txt
│   └── movielens-100k-train.txt
├── data_utils.py (Utilities about dataset.)
├── evaluation (Evaluation metrics and tools.)
│   ├── __init__.py
│   ├── rank_metrics.py
│   └── rec_evaluator.py
├── exp_notebooks (Notebooks containing experiments for comparison. dns means using pre-trained models with dynamic negative sampling. 
│    │         gen means pre-training generator while dis means pre-training discriminator. SGD and Adam are optimizers adopted.)
│   ├── BPR.ipynb
│   ├── IRGAN-Adam-dns-gen-dis.ipynb
│   ├── IRGAN-Adam-dns-gen.ipynb
│   ├── IRGAN-Adam-without-pretrained-model.ipynb
│   ├── IRGAN-dns-gen-Adam-G-SGD-D.ipynb
│   ├── IRGAN-SGD-dns-gen-dis.ipynb
│   ├── IRGAN-SGD-dns-gen-static-negative-sampling.ipynb
│   ├── IRGAN-SGD-without-pretrained-model.ipynb
│   ├── Pretrain-Discriminator-Dynamic-Negative-Sampling-Adam.ipynb
│   ├── Pretrain-Discriminator-Dynamic-Negative-Sampling.ipynb
│   └── Pretrain-Discriminator-Static-Negative-Sampling.ipynb
├── IRGAN-SGD-dns-gen.ipynb(IRGAN with the SGD optimizer and a pre-trained model with dynamic negative sampling for generator.)
├── model.py (Model definition.)
├── pretrained_models (Pre-trained models)
│   ├── pretrained_model_dns.pkl
│   └── pretrained_model_sns.pkl
├── readme.md

How to run

  1. Execute conda create --name <env_name> --file requirements.txt to create an virtual environment and install required packages.
  2. Run a jupyter notebook server by jupyter notebook.
  3. Open IRGAN-SGD-dns-gen.ipynb in a browser and run all cells. The output of loss and other evaluation metrics can be observed with tensorboard.(Other notebooks from the exp_notebooks directory can be moved out to its upper-level directory and run).

pytorch-irgan's People

Contributors

iyiyaha 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.