Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Add similar users example #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Xrampino
Copy link

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

@stevemar stevemar requested a review from MLnick April 13, 2018 12:57
Copy link
Contributor

@MLnick MLnick left a 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",
Copy link
Contributor

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",
Copy link
Contributor

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."
Copy link
Contributor

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."

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants