Closed mbajur closed 9 years ago
Hi, @mbajur! Thanks for trying out my little gem. Recommendable should work really well for your usecase, and it seems like you already figured out how to do that. Using likes
in replacement of follows
is exactly what I would do too, and it should work great that way. My guess is that you aren't running a background processor like Sidekiq or Resque and also aren't manually updating your recommendation data. Recommendable ships with background workers for common processors like Sidekiq, Resque, and DelayedJob. If one of those processes is running actively, it should just work and refresh recommendations when a user submits a new like.
If you're just playing around locally, you can update your recommendation data like this:
User.all.each do |user|
Recommendable::Helpers::Calculations.update_similarities_for(user.id)
Recommendable::Helpers::Calculations.update_recommendations_for(user.id)
end
Could you try that and then let me know if user_a gets any suggestions?
I have removed that code few minutes ago but i'm gonna recreate it tomorrow and let you know if that helped. Anyway - i have a recommendable sidekiq queue and i can see that there are some workers running when i'm liking stuff - is that enough?
That should be enough, yeah. I'd still suggest running that above code manually just in case and let me know if that doesn't help.
Ok i decided to recreate it now. I have run that code you provided and the output is the same with and without it - the only recommendation i can get in my whole environment and when user_A likes ONLY user_B (first scenario from What i'm trying to achieve) is that user_b.recommended_users
returns user_E as a recommendation. Running recommended_users
on any other user (including A) returns []
Oh actually, that makes sense. Sorry, I misunderstood the original situation. Recommendable doesn't really do the sort of recommendation logic you're talking about, it's all collaborative filtering. So it makes sense that the only recommendation is User E being recommended to User B. The reason for that is that both User B and User D follow User C. That increases the similarity between User B and User D, so User D's other like (User E) is recommended to User B. Does that make sense?
yeah, that totally makes sense :) too bad such scenario is not supported. I'm gonna continue my search for such thing. Big thanks for your help! :)
Hey! Please, tell me, is that possible to create a "People you may know" functionality using recommendable gem?
I decided to give it a try by using
like
as afollowing
relation. Here is my environment:What i'm trying to achieve
What i'm currently doing
What's wrong in here? I feel a bit lost in all that recommendation thing (that's probably third gem/tool i'm trying to use for that functionality and i'm still not able to do anything). Thanks in advance :)