Classifying sentiments in text by using Word Embedding and the model is built Tensorflow2.
In this project News Headlines Dataset For Sarcasm Detection by Rishabh Misra used to create a deep learning model which will be able to classify a sentence as sarcastic or not
.
While doing all of this we will go through:
preprocess text
for neural networksWord Embedding
and how to visualize them using Tensorflow Projector
GlobalAveragePooling1D
and Flatten
This deep learning model is trained using GPU
and to work in the same environment having packages with versions which were used while making this notebook, go to Kaggle where the kernel is saved.
The dataset is divided into 97% for training, 1.5% for validation and testing respectively. The model is trained for 20 epochs
.
Model’s performance on training
and validation
datasets.
Model’s performance on testing
dataset.
Model’s poor performance on testing
set might be because of small number of testing samples or our model might be facing overfitting
issue on training
and validation
. So there is room for improvement.
Visualizing the word embedding learned by the model
using Tensorflow Projector