All Projects → artem-oppermann → Sentiment-Analysis-of-Netflix-Reviews

artem-oppermann / Sentiment-Analysis-of-Netflix-Reviews

Licence: other
Sentiment Analysis LSTM recurrent neural network's.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Sentiment-Analysis-of-Netflix-Reviews

Pytorch Sentiment Analysis
Tutorials on getting started with PyTorch and TorchText for sentiment analysis.
Stars: ✭ 3,209 (+6192.16%)
Mutual labels:  sentiment-analysis, recurrent-neural-networks
Rnn Text Classification Tf
Tensorflow Implementation of Recurrent Neural Network (Vanilla, LSTM, GRU) for Text Classification
Stars: ✭ 114 (+123.53%)
Mutual labels:  sentiment-analysis, recurrent-neural-networks
overview-and-benchmark-of-traditional-and-deep-learning-models-in-text-classification
NLP tutorial
Stars: ✭ 41 (-19.61%)
Mutual labels:  sentiment-analysis, recurrent-neural-networks
Rcnn Text Classification
Tensorflow Implementation of "Recurrent Convolutional Neural Network for Text Classification" (AAAI 2015)
Stars: ✭ 127 (+149.02%)
Mutual labels:  sentiment-analysis, recurrent-neural-networks
Sentiment Analysis Nltk Ml Lstm
Sentiment Analysis on the First Republic Party debate in 2016 based on Python,NLTK and ML.
Stars: ✭ 61 (+19.61%)
Mutual labels:  sentiment-analysis, recurrent-neural-networks
Hey Jetson
Deep Learning based Automatic Speech Recognition with attention for the Nvidia Jetson.
Stars: ✭ 161 (+215.69%)
Mutual labels:  sentiment-analysis, recurrent-neural-networks
ml-book
Codice sorgente ed Errata Corrige del mio libro "A tu per tu col Machine Learning"
Stars: ✭ 16 (-68.63%)
Mutual labels:  sentiment-analysis
Paribhasha
paribhasha.herokuapp.com/
Stars: ✭ 21 (-58.82%)
Mutual labels:  sentiment-analysis
Tweetfeels
Real-time sentiment analysis in Python using twitter's streaming api
Stars: ✭ 249 (+388.24%)
Mutual labels:  sentiment-analysis
Malaya
Natural Language Toolkit for bahasa Malaysia, https://malaya.readthedocs.io/
Stars: ✭ 239 (+368.63%)
Mutual labels:  sentiment-analysis
TF-Speech-Recognition-Challenge-Solution
Source code of the model used in Tensorflow Speech Recognition Challenge (https://www.kaggle.com/c/tensorflow-speech-recognition-challenge). The solution ranked in top 5% in private leaderboard.
Stars: ✭ 58 (+13.73%)
Mutual labels:  recurrent-neural-networks
Sentiment-analysis-amazon-Products-Reviews
NLP with NLTK for Sentiment analysis amazon Products Reviews
Stars: ✭ 37 (-27.45%)
Mutual labels:  sentiment-analysis
danifojo-2018-repeatrnn
Comparing Fixed and Adaptive Computation Time for Recurrent Neural Networks
Stars: ✭ 32 (-37.25%)
Mutual labels:  recurrent-neural-networks
Chase
Automatic trading bot (WIP)
Stars: ✭ 73 (+43.14%)
Mutual labels:  recurrent-neural-networks
text-analysis
Weaving analytical stories from text data
Stars: ✭ 12 (-76.47%)
Mutual labels:  sentiment-analysis
Darwinexlabs
Datasets, tools and more from Darwinex Labs - Prop Investing Arm & Quant Team @ Darwinex
Stars: ✭ 248 (+386.27%)
Mutual labels:  sentiment-analysis
levheimcube
No description or website provided.
Stars: ✭ 11 (-78.43%)
Mutual labels:  sentiment-analysis
pyradox
State of the Art Neural Networks for Deep Learning
Stars: ✭ 61 (+19.61%)
Mutual labels:  recurrent-neural-networks
twitter sentiment challenge
The code uses the tweepy library to access the Twitter API and the TextBlob library to perform Sentiment Analysis on each Tweet.
Stars: ✭ 14 (-72.55%)
Mutual labels:  sentiment-analysis
Emotion-Cause-Analysis-Papers
Collection of papers on Emotion Cause Analysis
Stars: ✭ 63 (+23.53%)
Mutual labels:  sentiment-analysis

Sentiment-Analysis-of-Netflix-Reviews

In this project a Neural Network model based on Recurrent Neural Networks aims to predict whether a Netflix review conveys a positive or a negative sentiment. For each review the model predicts a percentage value for conveying a particular sentiment.

In case of Recurrent Neural Network I am using Long-Short-Term-Memory (LSTMs) networks. Via input arguments the user can specify whether these LSTMs should be bi-directional or uni-directional. A Dropout wrapper around the LSTMs prevents the overfitting.

Getting Started

Prerequisites

TensorFlow 1.5

Python 3.7.1

Data

The data consists of 5000 negative and 5000 positive Netflix reviews. You can examine the reviews in data/raw/.

I am using tf.Data API to ensure a fast, high performance data input pipeline. tf.DATA API works the best if the data is in the tf.Records format.

The cleaned and formatted reviews in tf.Record format can be found in data\tf_records\.

You can do the cleaning of the data by yourself by executing src\preprocess\clean_file.py. To export the data in tf.Records format execute src\data\tf_records_writer.py.

Start the Training of The Model

To start the training of the model run the python script src\train.py, with (optionaly) your own hyperparameters to overwrite the existing ones. For example:

  python src\train.py \
        --num_epoch=25 \
        --batch_size=32 \
        --learning_rate=0.0005 \
        --architecture=uni_directional (or bi-directional) \
        --lstm_units=100  \
        --dropout_keep_prob=0.5 \
        --embedding_size=100  \
        --required_acc_checkpoint=0.7 \

The meaning of these hyperparameters can be found in the documentations of tf.FLAGS in train.py.

After the execution, the training of the model should start. You can observe the training loss and the accuracy on the training set and test set. Accuracy gives the ratio of correctly predicted sentiment of a given Netflix Review. You may see results like these:

        epoch_nr: 0, train_loss: 0.654, train_acc: 0.629, test_acc: 0.737
        epoch_nr: 1, train_loss: 0.451, train_acc: 0.809, test_acc: 0.753
        epoch_nr: 2, train_loss: 0.294, train_acc: 0.889, test_acc: 0.762
        epoch_nr: 3, train_loss: 0.205, train_acc: 0.930, test_acc: 0.740
        epoch_nr: 4, train_loss: 0.141, train_acc: 0.951, test_acc: 0.754
        epoch_nr: 5, train_loss: 0.108, train_acc: 0.965, test_acc: 0.743
        epoch_nr: 6, train_loss: 0.085, train_acc: 0.973, test_acc: 0.723
        epoch_nr: 7, train_loss: 0.069, train_acc: 0.977, test_acc: 0.738
        epoch_nr: 8, train_loss: 0.055, train_acc: 0.984, test_acc: 0.725
        epoch_nr: 9, train_loss: 0.048, train_acc: 0.986, test_acc: 0.727
        epoch_nr: 10, train_loss: 0.044, train_acc: 0.987, test_acc: 0.723

During training we can observe overfitting on the training set. Hence a lower value for dropout_keep_prob is suggested.

After the accuracy on the test set reaches the value required_acc_checkpoint, the model begins to save checkpoints in checkpoints/model.ckpt of the underlying dataflow graph and the parameters of the network.

Deployment

For deployment perposes the model must be exported in the SavedModel format. In order to do so execute the script src\inference.py:

        python src\inference.py \
              --export_path_base==model-export/

Attention: Other hyparameters must stay the same as during the training of the network.

The created instance of SavedModel can be run in a Docker container in a cloud for example. (The documentation for this will be extended in the future.)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].