tensorflow / tensorflow/recommenders

Negative labels in Ranking model

Open
#355 3 comments 1 reaction 1 assignee View on GitHub

@maciejkula is already working on this.

Since Aug 17, 2021.

question
Dominant language
Python
Stars
2k
Forks
300
PR merge metrics
No merged PRs in 30d

Description

I have a dataset consisting of users positive interactions with assets. Before I was using a Retrieval Model, whose objective considers as positive label a given user-asset pair, and as negatives the user paired with the rest of the assets in the batch. But I have to move to a Ranking model due to non static dataset requirements.

However, the ranking model objective does not do that. Instead, it requires a target label for each pair. Given my dataset (and following the movies example) I should fill that tensor with 1s. But then, I wouldn't have negative examples, and the model would end up predicting 1s for all datapoints.

Is there a simple way to use in a Ranking model the rest of elements within the batch as negatives? What is the best setup to train a Ranking model with this king of data?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.