Recommender: Restaurant ratings

By for February 19, 2015

Report Abuse
This experiment demonstrates the use of the Matchbox recommender modules to train a restaurant recommendation engine.
# Recommender Modules In this tutorial, we will demonstrate a typical usage of Recommender modules in Azure Machine Learning studio. Recommenders are good for rating (predicting) similar items that users might like based on past habits and item characteristics. The recommendation algorithms are currently in use in website advertising on social media sites, all types of e-commerce sites, sponsored search results returned from search engines, and so on. In this experiment, we will train a recommender engine to recommend top restaurants to customers, then *score* restaurants based on the recommender engine with test data, and finally evaluate the recommender results. ## Data We use three datasets (Restaurant customer, Restaurant feature and Restaurant ratings) in this experiment. The datasets describes the restaurants, their customers, and the ratings they give. The datasets include both numerical and categorical features. Excerpt of each of the dataset is shown below. Restaurant Customer data has 19 attributes for 138 customers with each customer having a unique userID. ![][image_customer] Restaurant data has 21 attributes for 130 restaurants with each restaurant having a unique placeID. ![][image_restaurant] Restaurant Ratings data has 1161 customer ratings that customers (userID) provided for various restaurants (placeID). ![][image_ratings] ## Experiment The rating data is contained in the Restaurant ratings dataset, which consists of user-item-rating triples. This dataset is split into a training and a test set. The training set is processed by the [Train Matchbox Recommender]( module. Predictions for the test set are made by the [Score Matchbox Recommender]( and then evaluated by the [Evaluate Recommender]( module. The _recommender prediction kind_ is set to "Item Recommendation" so the final output metric is NDCG (Nornalized Discounted Cumulative Gain). The trainer and the scorer also accept the optional user and item feature parameters. These are pre-processed by the [Project Columns]( module to selects some of the relevant features. The following diagram shows the overall workflow of the experiment: ![][image_experiment] The detailed settings of the each module is explained in the following sections. # Prepare Dataset First, we select the attributes from Restaurant customer and Restaurant feature datasets with **Project Columns** module. We selected _userID, latitude, longitude, interest_, and _personality_ from Restaurant customer dataset and selected _placeID, latitude, longitude_, and _price_ from Restaurant feature dataset. The details are shown below: ![][image_project_column_customer] ![][image_project_column_restaurant] Then we split the Restaurant Ratings dataset with **Split** module into training set and test set using _Recommender Split_ option. The details of the setting is shown below: ![][image_split_ratings] # Train Matchbox Recommender The **Train Matchbox Recommender** module takes a traing set (part of Restaurant Ratings dataset) along with Restaurant customers attributes and Restaurant features as input and build a recommender engine. The settings of this module is shown below: ![][image_train_matchbox_recommender] # Score Matchbox Recommender The **Score Matchbox Recommender** module takes in a test set (part of Restaurant Rating dataset) and trained model along with the Restaurant customer attributes and Restaurant features as input. We try to recommend restaurants for customers, so we chose _Item Recommendation_ option in _Recommender prediction kind_ field. Further, we like to use the scored results for evaluation, so we chose _From Rated Items (for model evaluation)_ in _Recommended item selection_ field. More details of these options can be found in the [module documentation]( The settings of this module is shown below: ![][image_score_matchbox_recommender] # Evaluate Recommender The **Evaluate Recommender** takes the trained recommender model and score dataset (output from **Score Matchbox Recommender**) as input. The settings of this module is shown below: ![][image_evaluate_recommender] # Results The evaluation results show that the restaurant recommender has NDCG score of 0.916511 on the test set. ![][image_ndcg] <!-- Images --> [image_customer]: [image_restaurant]: [image_ratings]: [image_experiment]: [image_project_column_restaurant]: [image_project_column_Customer]: [image_split_ratings]: [image_train_matchbox_recommender]: [image_score_matchbox_recommender]: [image_evaluate_recommender]: [image_ndcg]: