Yelp Recommendataion System

by Team FireWorks

(Ying Chen, Yadnesh Gotey, Xuan Huang, Xiaoqiu Yu, Yi Zhan)

Find the Recommendation System here. http://yingchen.co/shiny/yelp/

1. Goal Definition

Finding the next “best-match” restaurants for Yelp users based on their review patterns.

2. How it works

The whole idea is based on the assumption that if you share the same opinions on a lot of things with someone, it's more likely that you both have similar ideas about others too.

In short, this recommendation system is based on analyzing the similarities between user-pairs and making rating predictions based on historical data.

Collaborative Filtering

We use a technique called Collaborative Filtering.

Collaborative Filtering (CF) is a method of making automatic predictions (filtering) about the interests of a user by collecting preferences or taste information from many users (collaborating).

Dataset

Our dataset is from Yelp Dataset Challenge, which provides us the user info, rest info and the review info.

Here's some key steps we take to format data:

Change the .json file into .csv file. (Here's some tips for changing file type.) Limit the city of restaurants to "Las Vegas" Count the review number by user_id, and keep those with more than 3 reviews Merge the review dataset with user and restaurants dataset by user_id and business_id Create Matrix

DataFrame to Matrix

With each rows of review data frames, we convert it into a Rating Matrix, whose columns showing the user_id, and rows showing business_id.

Find Similarity

We use cosine function to calculate the similarity between users.

For a given user pair, with their rating vectors (generated by the last step), we could know their similarities.

Predict Rating

There are two steps to take to calculate the predicting rating for a restaurant by a user.

Matrix Multiply: Multiply the similarity Matrix and the Rating Matrix. Divide the matrix created in the last step by the sum of all the similarities for users that reviewed that restaurant. Find the top 6 "Match"

Order the predicting rating, you get the top 6 Match!

3. Make the App

Shiny is a fantastic reporting package based on R.

With the server and ui written in the same directory, you could make your app. For information, click here.

Yelp Recommendation App

4. Deploy the App

Want share and deploy your app worldwide?

Rstudio has an embed publish tool: shinyapps.io, which makes it really simple to deploy the app just by clicking the publish button Digital Ocean provides service to deploy and have your own shiny server, which is cheaper than shinyapps.io. Click the link to sign up and you got $10 free Credit! More Info

Learn more about our projects?

Check the Google document and Project Page .