Recommendation Engine

FREEMIUM
By algorithms.io | Updated 8 giorni fa | Business
Health Check

N/A

README


Use Algorithms.io to Provide Automated Movie Recommendations


###Introduction

In this use case we’ll show how to use the item based collaborative filtering algorithm in our system to automatically recommend movies using the popluar “Movie Lens” data set (this data set is widely used in many machine learning examples). We’ll select a movie (Die Hard 2) that we know a specific person (in this case our nephew) likes. We can then compare that to a list of movies preferred by kids his age who also like Die Hard 2 to find out which other movies to recommend.

By applying this technique, we can use data to make a better decision on what new movie to recommend. This technique allows us to tailor our recommendation to the specific likes of a person based on the behavior of other people with similar preferences.

The use case described below can apply to ANY product recommendation. Product recommendations are one of the more popular applications of machine learning due to its success in increasing sales for ecommerce companies.

In this example we'll walk through the following steps:

  1. Selecting Sample Data (Input)
  2. Choosing and Running An Algorithm (Execution)
  3. Interpreting the Results (Output)

###Problem
Your teenage nephew, Peter, is coming to stay with you for the weekend.[1] Not being entirely sure how to entertain him this entire time, you’d like to be able to rent several movies that he might be interested in.

Being a teenager, you know his attention span is short, so you are really concerned about selecting movies that will keep him entertained. You know Peter has talked non-stop about the movie Die Hard 2 so you decide to look for movies similar to this.

You go online and find a data set of movies titled “Movie Lens”. This data set includes a list of 15,000 people who like the movie Die Hard 2. For the purposes of this example we’ll assume that all of the people in this data set are kids around Peter’s age. The survey shows movies other than Die Hard 2 that these kids prefer. The most popular movies from this list have the highest likelihood of being enjoyed by Peter.

With this information you are ready to use Algorithms.io to find out what movies to rent.

Input

To get started, download the Movie Lends data set here: Movie Lens Dataset.

As mentioned above, this data set includes records for approximately 15,000 customer. Each of these customers is known to like the movie Die Hard 2.

The two key variables to evaluate are customer similarity, and preference ranking.

#####Determining Customer Similarity
In this case, we are going to assume that all of the customers in the Movie Lens data set are similar to Peter based on a filter applied to the data before downloading. When implementing this technique for your own customers, it is important to consider what criteria you will use to determine which customers are similar to others. If you choose to use information for customers that are not similar, then your recommendations have a much higher likelihood of being irrelevant. Irrelevant recommendations will not drive the desired customer behavior (often a decision to buy).

#####Determining Customer Preferences
How might the customer preference data have been collected? Customers indicate their “preferences” in many different ways. Arguably the most definitive method is by making a purchase online. Based on purchase history you can infer the products a user prefers. Another methods include analyzing page view data, clickstream data, and customer surveys.

####Upload Data to Algorithms.io

The post command instructions are here: Upload Data

####Convert Movie Lens Data File to Proper Format

The collaborative filtering algorithm that we’ll use to make the movie recommendation takes a specific type of data input. Before it can process Movie Lens file, we’ll need to transform that file into the proper format.

This algorithm is included as Step 1 of the Recommendation Engine.

For more detailed instructions on how to use the data file preparation algorithm go here: Collaborative Filtering File Preparation.

Execution

####Running Recommendation

Running the recommendation is done by selecting the algorithm you wish to try from Step 2 of the Recommendation Engine. We provide several collaborative filtering algorithms for you to try.

If you are working with large data sets, or need faster results, we recommend working with item-based collaborative filtering. This method creates and item-item relation matrix that can be persisted and called against to provide recommendations without having to retrain your model every time.

Output

The results of the recommender will show movie titles, year the movie was made, and a similarity score. The similarity score is based on how kids in the Movie Lens data recommended that specific movie. Movies that are recommended more have a higher score.

The results will be returned in json structure as shown below:

 [
   {"output": {"api": {"Authentication": "Success"},"data": {"recommendation": 
  [{"id": "Dangerous Minds 1995", "value": "0.95810586"},
   {"id": "Star Trek V: The Final Frontier 1989","value": "0.9529066"},
   {"id": "Young Guns 1988", "value": "0.95277506"},
   {"id": "Die Hard: With a Vengeance 1995","value": "0.95277506"}]

We can see that Dangerous Minds, Star Trek V: The Final Frontier, and Young Guns 1988 are the top three results. You go ahead and rent

Luckily Peter’s tastes match those of other kids his age so the recommended movies are a hit, he enjoys both movies and you become his favorite relative.

###Application to Other Use Cases
This technique can be used to recommend other products or services. As mentioned at the beginning of this use case, Ecommerce relies heavily on automated recommendations to show potential customers products they are more likely to purchase. Personalizing product recommendations while a visitor is on the site has been shown to significantly increase purchases.

Often times recommendations are made in combination with clustering algorithms. Clustering can be used to break a large customer set down into small groups with similar characteristics. Using similar clusters of individuals as the basis for recommendations increases the likelihood that those recommendations will be relevant to new customers.

If you’d like to learn more about how you can implement a product or service recommendation for your business please contact us at support@algorithms.io and use the title “New Recommendation Inquiry”.

####Sources


  1. Example based on Mahout In Action, Sean Owen, Robin Anil, Ted Dunning, Ellen Friedman. October 14, 2011. You can find this book on Amazon here: Mahout in Action

Followers: 52
Resources:
Product Website
API Creator:
A
algorithms.io
algorithms.io
Log In to Rate API
Rating: 5 - Votes: 1