-
Notifications
You must be signed in to change notification settings - Fork 266
Add similar users example #38
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Xrampino
Thanks for the PR. I agree it would be nice to add similar users. The one issue, as you note, is that we only have user IDs, which makes it a little difficult to interpret (relative to similar movies and user recommendations, where we can see the movie posters to give some visual flavour to the results).
In any case I made a few comments, and in the last notebook section added, we can just say something to the effect that the results are difficult to interpret.
@@ -891,6 +891,21 @@ | |||
" hits = results['hits']['hits']\n", | |||
" return src, hits[1:num+1]\n", | |||
" \n", | |||
"def get_similar_users(the_id, q=\"*\", num=10, index=\"demo\", dt=\"users\"):\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we don't need a new method here. You can simply call get_similar(id, q, num, index, dt="users")
for the same result.
" \"\"\"\n", | ||
" Display similar users and similarity scores, in a table\n", | ||
" \"\"\"\n", | ||
" user, recs = get_similar_users(the_id, q, num, index, dt)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hence per my comment above, this call could just be user, recs = get_similar(the_id, q, num, index, dt="users")
"source": [ | ||
"### 5(c) Get users similar to another\n", | ||
"\n", | ||
"It is also possible to compute similar users for a given one. We have only indexed IDs for our users, but it is already functional enough." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about something like "It is also possible to compute similar users for a given one. Note that we have only indexed IDs for our users, so the results are difficult to interpret. However, we include the computation here for completeness."
Hello,
I've added functions to display users similar to a given one, for user-user recommendation. Since we only use user IDs and not usernames, it is a bit raw, but it is still functional