tensorflow / tensorflow/recommenders

returning similar users after training (ranking an embedding)

Open
#353 4 comments 0 reactions 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

apologies if there is a super simple answer to this that I have missed, but given a successful training of a recommender (e.g. with movielens), presumably it would not be too hard to return a list of similar users given an individual user id? I've being using tensorboard to get a visualization of the space of users. Here's an example from my own data set:

Screenshot 2021-08-16 at 18 36 56

tensorboard itself allows one to specific a user id and get a ranked list of other users based on how close they are in the learned embedding space.

in a super simple slimmed down version with an embedding of only two dimensions we can see that each user id is represented as a 2-dimensional vector within the user_model:

[ 0.016, -0.027] ==> UNK
[ 0.454, -0.095] ==> 123456
[-0.44 ,  0.132] ==> 456788

so presumably there would be a relatively straightforward operation to rank all other users in order of their similarity to a given user, according to, say, euclidean distance in the n-dimensional space?

I'm sure I can do it element wise and then sort, but just wondering if there's an existing quick method as part of recommenders, rankings or embeddings?

Related?

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.