Skip to content
Predict the rating given to a restaurant based solely on the review text. Uses custom NLP primitives.
Jupyter Notebook Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
helpers.py
predict-restaurant-rating.ipynb
requirements.txt

README.md

Predicting the rating a reviewer will give a restaurant using Featuretools and the nlp-primitives library

Featuretools

When customers visit restaurants, they will oftentimes leave a review of some sort. Using data from TripAdvisor, we investigate how this text data can be used to predict the overall thoughts of the customer on that restuarant represented in a star rating.

In this tutorial, we show how Featuretools can be used alongside the nlp-primitives library to train an accurate machine learning model that can predict a customer's rating of a restaurant based on the text of their review and some information about the restaurant.

Highlights

  • We use the nlp-primitives library to create structured data from unstructured, hard to parse, text data
  • We acheive an accuracy rating 40% higher than the baseline
  • We use these primitives alongside Featuretools' dfs method to create as much information as possible from a dataset containing only two entities.
  • The dfs method stacks the default primitives on top of the nlp-primitives to create new, data-rich, features.
  • We build a pipeline that it can be reused for numerous NLP prediction problems (You can try this yourself!)

Running the tutorial

  1. Clone the repo

    git clone 
    
  2. Install the requirements

    pip install -r requirements.txt
    
  3. Download the data

    You can download the data directly from Kaggle here. Be sure to re-name it reviews.json, or change the file name in the tutorial.

  4. Run the tutorial notebook, Predict-Restaurant-Rating using Jupyter

    jupyter notebook
    

Feature Labs

Featuretools

Featuretools is an open source project created by Feature Labs. To see the other open source projects we're working on visit Feature Labs Open Source. If building impactful data science pipelines is important to you or your business, please get in touch.

Contact

Any questions can be directed to help@featurelabs.com

You can’t perform that action at this time.