Rails 协作过滤
ActsAsRecommendable is a plugin for Rails that simplifies collaborative filtering
The plugin provides a mechanism for finding loose associations between users and items which we can tell you
The plugin calculations can be made online and offline and stored using the rails cache (such as memcache) for online retrieval. Online retrieval of recommendations uses item-based collaborative filtering using the offline items similarity matrix stored in the cache. This can give up-to-date results with a much lower processing overhead.
Much thanks to Toby Segaran and his excellent book Programming Collective Intelligence (http://oreilly.com/catalog/9780596529321/).
Use join rating scores Using abitary calculated scores Similar Items Recommended Users Cached dataset
v0.1 should be considered early alpha and not ready for production applications.
Lots of performance optimisations still to be done.
class Book :user_books end
class UserBook :user_books acts_as_recommendable :books, :through => :user_books end
user = User.find(:first) user.similar_users #=> [...] user.recommended_books #=> [...]
book = Book.find(:first) book.similar_books #=> [...]
class Movie :user_movies end
class UserMovie :user_movies acts_as_recommendable :movies, :through => :user_movies, :score => :score
end
user = User.find(:first) user.similar_users #=> [...] user.recommended_movies #=> [...]
class Book :user_books, :use_dataset => true
end
class UserBook :user_books acts_as_recommendable :books, :through => :user_books end
user = User.find(:first) user.recommended_books #=> [...]
User.aar_options[:use_dataset] = true
Copyright (c) 2008 Made by Many Ltd, released under the MIT license
暂无开放 Issues,或尚未同步最近议题。