4 ms·
Good stuff, and a nice writeup/explanation! To impudently hijack the thread: for a very similar approach (jaccard similarity coefficient, ruby) which has a nic
by wfn 13y ago
Good stuff, and a nice writeup/explanation!
To impudently hijack the thread: for a very similar approach (jaccard similarity coefficient, ruby) which has a nice abstracted implementation for background workers, take a look at David Celis 'recommendable' - here's him introducing the same system: http://davidcel.is/blog/2012/02/07/collaborative-filtering-with-likes-and-dislikes/ http://davidcel.is/blog/2012/02/07/collaborative-filtering-w... and the gem itself: http://davidcel.is/recommendable/ http://davidcel.is/recommendable/ I believe it's been discussed on HN before.
Redis is used to store the binary votes, and to compute similarity coefficients. Since redis is very good with set operations (intersections on multi-million-member sets (and more) are crazy fast), it's quite the natural choice for the db backend. One of the cases where a NoSQL solution seems to be the right tool for the job, as a matter of fact!
I've used recommendable (incl. in production code) in the past, it works very well, is reliable, robust, and easily hackable for whatever needs. (e.g. it's meant to integrate with Rails, but it's quite simple to make it work on barebones ruby, with (e.g.) Sinatra as a lightweight web app exposing vote functionality, and so on.)
- otobrglez 13y agoThanks for the reference. David's post looks awesome!