Code Monkey home page Code Monkey logo

crif's Introduction

CRIF

Description

This repository is the source code of the paper Learning to Infer User Implicit Preference in Conversational Recommendation implemented via PyTorch.

More descriptions are available via the paper.

The code is partially refer to Adapting User Preference to Online Feedback in Multi-round Conversational Recommendation (FPAN).

Requirement

  • torch==1.4.0
  • torch_geometric==1.4.3
  • tqdm
  • sklearn

Dataset

The dataset we used is based on Yelp and LastFM which are processed in SCPR

Usage

  • To train CRIF offline model: python offline_train_rec.py The model paramters will be saved in \recommendersystem\recmodel
  • To train policy network in conversational component: Inverse reinforcement learning (IRL) is adopted to tackle the decision-making problem. We conduct our approach to learn a reward function from human feedback and optimize it explicitly using human feedback. At the same time, we also train a policy to maximize reward given the current predicted reward function.
    • python train_agent_ear.py --mode pretrain: train policy network without pretrain model. The model parameters will be saved in \agents\agent_ear
    • python train_agent_ear.py --mode PG: further train policy network with pretrain model. The model parameters will be saved in \agents\agent_ear
  • To directly evaluate CRIF: We provided the model parameters in corresponding folder.
    • python offline_test_rec.py: evaluate CRIF offline model
    • python test_agent_ear.py: evaluate CRIF with user simulator

crif's People

Contributors

lsunqq avatar studenthc 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.