Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommendation engine in Rails

I would like to have a recommendation functionality for my Rails web app. In particular, I want to recommend a newly signed-up user other users he may want to follow.

Is there an engine/gem for this purpose in Rails? If not, where should I start to build it?

Thank you.

like image 468
AdamNYC Avatar asked Dec 24 '11 23:12

AdamNYC


3 Answers

  1. There's Coletivo gem https://github.com/diogenes/coletivo I tried it a bit. Runs on MySQL.

  2. Neo4j http://neo4j.org is really easy to implement a "who to follow". In fact, most samples showing its abilities involve "who to follow". Quick tip - Neo4j.rb is cool only if you are running on JRuby. If not - use Neography https://github.com/maxdemarzi/neography, which is a REST wrapper and seems pretty fast.

Edit

Coletivo gem is dead.

like image 109
elado Avatar answered Oct 07 '22 13:10

elado


Maybe this answer isn't useful for you anymore, but it might be for anyone else who's looking for a recommendation engine for Rails.

  1. There was a interesting Gem called Recommendify (based on Ruby and Redis). It's still out there, but development seems inactive. Many had issues with installation but it seemed to do the job.
  2. But based on that, there seems to be an even better gem: Predictor from Pathgather. None of the users seem to have any difficulties with it and it seems to be scalable.

You'll need Redis for it to work and Hiredis for better performance.

like image 41
Sebastian Plasschaert Avatar answered Oct 07 '22 12:10

Sebastian Plasschaert


  1. predictor is a popular, mature gem that has been heavily performance optimized. It does require you to have Redis setup, and to keep track of all your model associations in Redis.
  2. If you're looking for something simpler, I've created a gem called simple_recommender. It uses existing associations in your database and doesn't require Redis, so it might be easier for getting started.
like image 26
Geoffrey Litt Avatar answered Oct 07 '22 13:10

Geoffrey Litt