Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 880 Bytes

File metadata and controls

25 lines (19 loc) · 880 Bytes

Sentiment-Analysis

A simple sentiment analysis model:

Layer one: Input layer
Layer two: keras' Embedding layer, note that i used GloVe's pretrained word embeddings
Layer three: Global max pooling
Layer four: 10 neurons Dense layer with relu activation
Layer five: 1 neuron Dense layer with sigmoid activation

Trained on labelled sentences from 'imdb'

Training Accuracy: 1.0000
Testing Accuracy: 0.7680

Trained on labelled sentences from 'amazon'

Training Accuracy: 1.0000
Testing Accuracy: 0.7960

Trained on labelled sentences from 'yelp'

Training Accuracy: 1.0000
Testing Accuracy: 0.8128

SA.py contains the model and the function used for training

demo.py is used for prediction