https://github.com/rid17pawar/sentiment-analysis-model-experiments
Experiments in the field of Sentiment Analysis using ML Algorithms namely Logistic Regression, Naive Bayes along with tfidf, one hot encoding, bag of words vectorization. Different MLP and RNN models viz. LSTM, GRU, Bidirectional LSTM. Lastly, state of the art BERT model
https://github.com/rid17pawar/sentiment-analysis-model-experiments
bag-of-words bert bidirectional-lstm gru logistic-regression lstm ml-algorithms naive-bayes neural-networks one-hot-encoding rnn sentiment-analysis sentiment-classification text-vectorization tfidf tfidf-vectorizer transformer-architecture twitter-sentiment-analysis
Last synced: 3 months ago
JSON representation
Experiments in the field of Sentiment Analysis using ML Algorithms namely Logistic Regression, Naive Bayes along with tfidf, one hot encoding, bag of words vectorization. Different MLP and RNN models viz. LSTM, GRU, Bidirectional LSTM. Lastly, state of the art BERT model
- Host: GitHub
- URL: https://github.com/rid17pawar/sentiment-analysis-model-experiments
- Owner: rid17pawar
- Created: 2023-07-02T06:09:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-02T11:44:46.000Z (almost 2 years ago)
- Last Synced: 2025-01-17T22:08:50.834Z (5 months ago)
- Topics: bag-of-words, bert, bidirectional-lstm, gru, logistic-regression, lstm, ml-algorithms, naive-bayes, neural-networks, one-hot-encoding, rnn, sentiment-analysis, sentiment-classification, text-vectorization, tfidf, tfidf-vectorizer, transformer-architecture, twitter-sentiment-analysis
- Language: Jupyter Notebook
- Homepage:
- Size: 1.8 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sentiment-Analysis-Model-Experiments
## Dataset Used:
[Twitter US Airline Sentiment - Kaggle](https://www.kaggle.com/datasets/crowdflower/twitter-airline-sentiment)## Experiments:
#### Experiment-1. Using Machine Learning Algorithms and Vectorization Techniques For Sentiment Analysis*Text-Vectorization Techniques used:*
- CountVectorizer
- TfidfVectorizer
- OneHotEncoding
*ML Algorithms used:*
- Logistic Regression
- Naive Bayes#### Result:

*BEST MODEL: TFIDFvectorizer_LogisticRegression*#### Experiment-2. Multi-Layer Perceptron (MLP) Models with different Model Architectures and Optimizers For Sentiment Analysis
Model Architectures:
- Model-1
Layer (type) - Output Shape
layer_1 (Dense) - (None, 64)
layer_2 (Dense) - (None, 64)
layer_3 (Dense) - (None, 3)
- Model-2
Layer (type) - Output Shape
layer_1 (Dense) - (None, 32)
layer_2 (Dense) - (None, 3)
- Model-3
Layer (type) - Output Shape
layer_1 (Dense) - (None, 10)
layer_2 (Dense) - (None, 3)
Optimizers:
- adam
- rmsprop
- sgd#### Result:
#### Experiment-3. Recurrent Neural Network (RNN) Models For Sentiment Analysis
Model Architectures:
- Simple RNN Model
Layer (type) - Output Shape
embedding_12 (Embedding) (None, 22, 100)
layer_1 (SimpleRNN) (None, 128)
layer_2 (Dense) (None, 10)
output_layer (Dense) (None, 3)
- LSTM Model
Layer (type) - Output Shape
embedding_12 (Embedding) (None, 22, 100)
layer_1 (LSTM) (None, 128)
output_layer (Dense) (None, 3)
- GRU Model
Layer (type) - Output Shape
embedding_12 (Embedding) (None, 22, 100)
layer_1 (GRU) (None, 128)
output_layer (Dense) (None, 3)
- Bidirectional LSTM Model
Layer (type) - Output Shape
embedding_12 (Embedding) (None, 22, 100)
bidirectional_6 (Bidirectional) (None, 128)
output_layer (Dense) (None, 3)#### Result:
#### Experiment-3. Pretrained and Finetuned BERT Model For Sentiment Analysis
#### Result:
**Overall Best Model: BERT**