Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glmack/review_text_classifier
text classification using online customer reviews of restaurants
https://github.com/glmack/review_text_classifier
Last synced: 16 days ago
JSON representation
text classification using online customer reviews of restaurants
- Host: GitHub
- URL: https://github.com/glmack/review_text_classifier
- Owner: glmack
- Created: 2019-05-29T16:30:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-09T21:08:41.000Z (over 5 years ago)
- Last Synced: 2024-08-01T00:50:21.140Z (3 months ago)
- Language: JavaScript
- Size: 8.54 MB
- Stars: 3
- Watchers: 0
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# review_test_classifier
This project predicts multi-class customer sentiment using text features from labelled customer reviews of restaurants from Yelp and Google.Business understanding
Predictive insights of customer-related metrics can help retail establishments make decisions that improve customer experience. However, the quality of customer predictions require text data that correctly expresses the heterogeneity and salient points of customer voices in natural language, as well as performance optimization across different algorithmic options.Data understanding
Customer reviews for this project were sourced from: 1) an aggregated subset of seven million Yelp customer reviews made available by Yelp as a set of downloadable JSON files, as well as 2) three hundred test customer reviews queried from the Places API of Google. For project purposes, the data was stored in, and queried from, a MongoDB database.Data preparation
Raw strings of customer reviews were extracted, processed and represented to models through a bag-of-words approach under a variety of alternate specifications using the Scikit-learn library. Specifications of parameters included, e.g.:
1) alternative tokenization strategies using:
a) only unigrams, b) only bigrams, and c) combined unigram and bigrams,
2) dimensionality reduction techniques that included ANOVA F-scores,
3) vectorization techniques using term-frequency inverse document frequency (TFIDF) algorithms.
The prediction target comprised three classes representing positive, neutral and negative customer sentiment, which we created by aggregating customer-defined scores on a 1 to 5 basis, where out positive sentiment class = user score of 5, neutral sentiment class = score of 4, and negative sentiment class = scores of 1, 2, or 3.Modeling
The basic modelling task for this project was multi-class classification using text features. Models tested included logistic regression, support vector machines, and boosting ensemble models from the XG boost library.Evaluation
We evaluate model performance and associated parameter specifications using log loss and accuracy score metrics. The test set evaluation results for the initial top-performing model, a logistic regression classifier, was 0.75, and the log loss was 0.56.Deployment
We deployed the top performing model through a flask app for the purpose of basic user testing.