Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for item-based similarity #19

Open
blackgold9 opened this issue Mar 19, 2012 · 14 comments
Open

Support for item-based similarity #19

blackgold9 opened this issue Mar 19, 2012 · 14 comments

Comments

@blackgold9
Copy link

We have similar raters in the gem right now, but i would love to query similar recommendable items(Users who liked x also liked y)?

@davidcelis
Copy link
Owner

current_user.common_likes_with(friend)
#=> [#<Movie title: '2001: A Space Odyssey', year: 1968>]

Similarly, you can do common_dislikes_with

@davidcelis
Copy link
Owner

Oops, I jumped to conclusions and misread this. However, liked_by on the recommended item is a public method and returns an array of instances of your User model that liked it.

item.liked_by
#=> [user1, user3, user42, user89, …]

disliked_by is similarly defined

@davidcelis
Copy link
Owner

Sorry, I just now completely wrapped my head around what you were asking, and this is a good feature request. I can take a stab at this later, though I'd prefer to fix the issues that you and the other two are having first. I can look at it soon, or you could always take a stab at it as well and submit a pull request.

@blackgold9
Copy link
Author

No pressure :) Just wanted to put it on the docket.

@davidcelis
Copy link
Owner

This would actually be, from what I can tell and as I think about it more, super easy to do and would be useful to boot. Thanks for suggesting!

@davidcelis
Copy link
Owner

So I've been thinking about this for a while now, and I'm not sure that this is something I really want to include in the framework. Having recommendable handle both user-based and item-based similarities will really increase the memory footprint of Redis. I could perhaps implement it in a way where the user chooses one or the other (or if they really want to, both), but they'll have to be explicitly chosen. This may be a simpler task after I implement the callbacks feature that another user suggested. Until then, I'm putting this on the backlog.

@jinzhu
Copy link

jinzhu commented Jun 16, 2012

Hi @davidcelis, how is this going?

@davidcelis
Copy link
Owner

@jinzhu See my previous comment

@aaronchi
Copy link

I would love to see this. In the meantime, I may have to run this and recommendify in tandem to get both :)

@bencrouse
Copy link

Would it be possible do to this by having the recommended model recommend itself? So, for example, when a user likes a product, you write a callback that has that product like the other products the user has liked. Then, would the product.recommended_products be the same relationship (or maybe product.similar_products)?

@davidcelis
Copy link
Owner

i think what i'd rather do is, with version 3, implement a per-recommendable configuration. i.e. you can pass options to recommends :things, one of which would allow it to be an item-based similarity as opposed to user-based. version 3 has a lot of good stuff in the works, but i don't have a ton of time to work on it.

@holgerw
Copy link

holgerw commented Oct 16, 2013

+1 item-based recommendations

@ddgromit
Copy link

ddgromit commented Apr 9, 2014

+1

Recommendify does item-based recommendations and we were getting great results from it, but were scared off from using it in production since the project is not really maintained anymore. I'd love to see that feature in this gem.

@bencrouse
Copy link

@ddgromit I was in the same boat, and ended up going with https://github.com/Pathgather/predictor

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

No branches or pull requests

7 participants