项目作者: AkashSDas

项目描述 :
Classifying sentiments in text by using Word Embedding and the model is built Tensorflow2.
高级语言: Jupyter Notebook
项目地址: git://github.com/AkashSDas/classify-sentiments-in-text-using-tensorflow.git
创建时间: 2021-03-29T14:07:11Z
项目社区:https://github.com/AkashSDas/classify-sentiments-in-text-using-tensorflow

开源协议:Apache License 2.0

下载


Classify sentiments in text using Tensorflow

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:

  • How to preprocess text for neural networks
  • Importance of Word Embedding and how to visualize them using Tensorflow Projector
  • When to use GlobalAveragePooling1D and Flatten

Table of contents

Getting started

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.

Deep learning model performance

The dataset is divided into 97% for training, 1.5% for validation and testing respectively. The model is trained for 20 epochs.

Image5
Image6

Model’s performance on training and validation datasets.

Image7

Model’s performance on testing dataset.

Image8

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 Word Embedding

Visualizing the word embedding learned by the model using Tensorflow Projector

Image1
Image2
Image3
Image4

License

APACHE LICENSE, VERSION 2.0