Coder Social home page Coder Social logo

duxy-me / mtpr Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 5.0 41.36 MB

Experimental codes for the paper 'How to Learn Item Representation for Cold-Start Multimedia Recommendation?'

Home Page: https://github.com/duxy-me/MTPR

Python 100.00%
mtpr multi-task pairwise-learning conterfactual recommendation

mtpr's Introduction

Multi-Task Pairwise Ranking

Multi-Task Pairwise Ranking (MTPR) aims to address the discrepancy during the training process of cold-start recommendation. The discrepancy results in suboptimal item representation for multimedia recommendation.

suboptimal.jpg

We devised dual item representations consisting of two vectors, where N-rep indicates the normal representation that corresponds to all item representations and C-rep indicates the counterfactual representation that assumes the item is cold. We then proposed multi-task pairwise ranking, a loss function composed of four pairwise ranking branches, to optimize the representations with the target of modeling the correlations between non-cold and cold items.

This our official implementation for the paper:

Xiaoyu Du, Xiang Wang, Xiangnan He, Zechao Li, Jinhui Tang, and Tat-Seng Chua, How to Learn Item Representation for Cold-Start Multimedia Recommendation?, in Proceedings of MM'20.

If you use the codes, please cite our paper. Thanks!

Requirements

  • Python==3.5
  • Pytorch==1.4
  • numpy, scipy, argparse, logging, sklearn, tqdm

Quick Start

curve.png

python main.python

Dataset

The three datasets can be found here, https://drive.google.com/file/d/1iKm2gHLuQ9X89l1Efq8Y9iJyRiV48sMu/view?usp=drive_link

In this repository, we provide the dataset "amazon" in amazon/men.npy.

>>> import numpy as np
>>> data = np.load('amazon/men.npy', allow_pickle=True)
>>> data.item().keys()
dict_keys(['train', 'feat', 'val', 'test'])
>>> len(data.item()['train'])
27044
>>> len(data.item()['val'])
27044
>>> len(data.item()['test'])
27044
>>> data.item()['feat'].shape
(86506, 64)

mtpr's People

Contributors

duxy-me avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mtpr's Issues

other datasets

Dear xiaoyu:
Thank you for your code. And will you publish the other dataset,such as tiktok?

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.