tensorflow / tensorflow/recommenders

candidates argument for FactorizedTopK

Open
#688 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi,
metrics = tfrs.metrics.FactorizedTopK( candidates=movies.batch(128).map(movie_model) )
I'm trying to figure out how 'candidates' argument works for FactorizedTopK metric from the retrieval tutorial.
The tutorial uses 'movies' dataset, and I found the dataset includes some duplicates.
I tested using an array of unique movies for that argument and I got different accuracy compared to using 'movies' dataset.
Can anyone help me to understand how the candidates are used to calculate accuracy and how I should create this from the dataset I have (order of items and batch size)?

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.

Research direction

Start with the retrieval tutorial's FactorizedTopK example and the candidates argument in the metric's documentation or implementation. Compare the duplicate-containing movies dataset with the unique array, then document how candidate order, batching, and duplicates affect accuracy and how users should prepare their dataset.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.