That's under `lib/recommendable/acts_as_recommended_to.rb` towards the bottom. It's a combination of the `similarity_with(rater)` and `predict(object)` methods. Additionally, I detail the algorithm here: http://davidcelis.com/blog/2012/02/07/collaborative-filterin...