Giter Site home page Giter Site logo

qcactus / cpr Goto Github PK

View Code? Open in Web Editor NEW
42.0 42.0 7.0 44.59 MB

TensorFlow implementation of our paper: Cross Pairwise Ranking for Unbiased Item Recommendation (WWW'22)

License: MIT License

Python 72.70% C++ 18.97% Cython 8.32%
collaborative-filtering learning-to-rank popularity-bias recommendation recommender-system webconf2022 www2022

cpr's People

Stargazers

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

Watchers

 avatar  avatar  avatar

cpr's Issues

Request to Add a License to the Code Repository

First, thank you for sharing your work with the community!

I kindly ask if you could consider adding an open-source license to your repository for enabling others to reference your work.

Thank you for considering our request!

Incorrect row/column switching in cpr.py

In the file cpr.py, the code on line 38 is supposed to switch columns, but is, to my understanding, switching rows.

for u, i in zip(u_list, i_list[1:] + [i_list[0]])

This is causing incorrect model behavior. According to equation (13) of the paper and line 7 of the pseudo-algorithm, the procedure should switch the first item of the tuple to the last positon of each tuple. Each row of i_list seems to contain the concatenated embedding vectors of all idx + 2 items of the tuple. So its shape is (idx + 2)*embed_size. Hence, we should be shifting the first embed_size columns to the end.

To fix this issue, the code should be changed to switch the first embed_size columns to the end instead of the first row.

This issue was discovered during testing of the cpr.py file, and appears to be affecting model training. For validation, I tried to input a shifted item sequence directly and computed pos_scores. They should have been identical to neg_scores of the non-shifted sequence but they were not.

Apologies if I have misunderstood your code and there is no error. Please let me know if you require any additional information.

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.