Want to add personalization such as recommendations or content discovery to your application? PredictionIO has your back.
You can download and install the server yourself or use their cloud infrastructure. Clients already exist for Java, PHP, Python, and Ruby, and I assume more are on the way.
Check out all of their open source goods right here.
David Celis hates five star ratings systems:
Binary voting habits are most certainly not an odd phenomenon. People tend to vote in only two different ways. Some folks give either 1 star or 5 stars. Some people fluctuate between 3 and 4 stars. There are always outliers, but what it comes down to is this: a person’s binary votes indicate, in general, a dislike or like of what they’re voting on.
For this reason, David has created Recommendable, a recommendation engine for Rails 3.1 and 3.2 based on Redis. With just a bit of DSL magic in your model, your users can now like or dislike other types in your system:
class User < ActiveRecord::Base
recommends :movies, :shows, :other_things
# like a movie
# dislike a movie
Recommendable also provides the usual Ron Burgundy-approved interrogative methods:
There are also a number of helpful methods for ignoring items, getting shared likes between two users, and more. Check the README for setup and advanced usage.
Also, in case you missed it, last month we covered Recommendify, a Ruby and Redis powered recommendation engine from Paul Asmuth if you need full blown recommendations instead of binary voting.
Once application content grows to a certain size, it becomes a challenge to help users find what interests them. Sites like Amazon have offered product recommendations for years based on shoppers’ browsing and buying habits. Recommendify from Paul Asmuth brings that sort of collaborative filtering to your Ruby application. Using a Redis backend, Recommendify lets you build “interaction sets” and retrieve recommendations:
# Our similarity matrix, we calculate the similarity via co-concurrence
# of products in "orders" using the jaccard similarity measure.
class MyRecommender < Recommendify::Base
# store only the top fifty neighbors per item
# define an input data set "order_items". we'll add "order_id->product_id"
# pairs to this input and use the jaccard coefficient to retrieve a
# "customers that ordered item i1 also ordered item i2" statement and apply
# the result to the item<->item similarity matrix with a weight of 5.0
# :native => true,
:similarity_func => :jaccard,
:weight => 5.0
recommender = MyRecommender.new
# add `order_id->product_id` interactions to the order_item_sim input
# you can add data incrementally and call RecommendedItem.process! to update
# the similarity matrix at any time.
recommender.order_items.add_set("order1", ["product23", "product65", "productm23"])
recommender.order_items.add_set("order2", ["product14", "product23"])
# Calculate all elements of the similarity matrix
# ...or calculate a specific row of the similarity matrix (a specific item)
# use this to avoid re-processing the whole matrix after incremental updates
# retrieve similar products to "product23"
=> [ <Recommendify::Neighbor item_id:"product65" similarity:0.23>, (...) ]
I can’t wait for a Spree plugin. Almost 400 watchers in the last week, grab the source on GitHub.