All Projects → prrao87 → Tweet Stance Prediction

prrao87 / Tweet Stance Prediction

Licence: mit
Applying NLP transfer learning techniques to predict Tweet stance

Projects that are alternatives of or similar to Tweet Stance Prediction

Getting Things Done With Pytorch
Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoencoders, Object Detection with YOLO v5, Build your first Neural Network, Time Series forecasting for Coronavirus daily cases, Sentiment Analysis with BERT.
Stars: ✭ 738 (+710.99%)
Mutual labels:  jupyter-notebook, transfer-learning
Teacher Student Training
This repository stores the files used for my summer internship's work on "teacher-student learning", an experimental method for training deep neural networks using a trained teacher model.
Stars: ✭ 34 (-62.64%)
Mutual labels:  jupyter-notebook, transfer-learning
Skin Cancer Image Classification
Skin cancer classification using Inceptionv3
Stars: ✭ 16 (-82.42%)
Mutual labels:  jupyter-notebook, transfer-learning
Modelsgenesis
Official Keras & PyTorch Implementation and Pre-trained Models for Models Genesis - MICCAI 2019
Stars: ✭ 416 (+357.14%)
Mutual labels:  jupyter-notebook, transfer-learning
Sru Deeplearning Workshop
دوره 12 ساعته یادگیری عمیق با چارچوب Keras
Stars: ✭ 66 (-27.47%)
Mutual labels:  jupyter-notebook, transfer-learning
Video Classification
Tutorial for video classification/ action recognition using 3D CNN/ CNN+RNN on UCF101
Stars: ✭ 543 (+496.7%)
Mutual labels:  jupyter-notebook, transfer-learning
Densedepth
High Quality Monocular Depth Estimation via Transfer Learning
Stars: ✭ 963 (+958.24%)
Mutual labels:  jupyter-notebook, transfer-learning
Fast Pytorch
Pytorch Tutorial, Pytorch with Google Colab, Pytorch Implementations: CNN, RNN, DCGAN, Transfer Learning, Chatbot, Pytorch Sample Codes
Stars: ✭ 346 (+280.22%)
Mutual labels:  jupyter-notebook, transfer-learning
Weakly Supervised 3d Object Detection
Weakly Supervised 3D Object Detection from Point Clouds (VS3D), ACM MM 2020
Stars: ✭ 61 (-32.97%)
Mutual labels:  jupyter-notebook, transfer-learning
Neural Painters X
Neural Paiters
Stars: ✭ 61 (-32.97%)
Mutual labels:  jupyter-notebook, transfer-learning
Xlearn
Transfer Learning Library
Stars: ✭ 406 (+346.15%)
Mutual labels:  jupyter-notebook, transfer-learning
Imageclassification
Deep Learning: Image classification, feature visualization and transfer learning with Keras
Stars: ✭ 83 (-8.79%)
Mutual labels:  jupyter-notebook, transfer-learning
Trainyourownyolo
Train a state-of-the-art yolov3 object detector from scratch!
Stars: ✭ 399 (+338.46%)
Mutual labels:  jupyter-notebook, transfer-learning
Tensorflow 101
TensorFlow 101: Introduction to Deep Learning for Python Within TensorFlow
Stars: ✭ 642 (+605.49%)
Mutual labels:  jupyter-notebook, transfer-learning
Amazon Forest Computer Vision
Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks
Stars: ✭ 346 (+280.22%)
Mutual labels:  jupyter-notebook, transfer-learning
Seismic Transfer Learning
Deep-learning seismic facies on state-of-the-art CNN architectures
Stars: ✭ 32 (-64.84%)
Mutual labels:  jupyter-notebook, transfer-learning
Pytorch Nlp Notebooks
Learn how to use PyTorch to solve some common NLP problems with deep learning.
Stars: ✭ 293 (+221.98%)
Mutual labels:  jupyter-notebook, transfer-learning
Ner Bert
BERT-NER (nert-bert) with google bert https://github.com/google-research.
Stars: ✭ 339 (+272.53%)
Mutual labels:  jupyter-notebook, transfer-learning
Average Word2vec
🔤 Calculate average word embeddings (word2vec) from documents for transfer learning
Stars: ✭ 52 (-42.86%)
Mutual labels:  jupyter-notebook, transfer-learning
Tensorflow
This Repository contains all tensorflow tutorials.
Stars: ✭ 68 (-25.27%)
Mutual labels:  jupyter-notebook, transfer-learning

Stance Classification of Tweets using Transfer Learning

Applying transfer learning (using existing neural network architectures) to perform stance classification of Tweets as per the SemEval 2016 Stance Detection Task.

The methodology is described in detail in this Medium post and compared (in detail) the transfer learning approaches used.

For subtask A, the goal is to classify Tweets in response to a particular topic into one of three classes: Favor, Against and None. The provided notebooks attempt this using a technique in deep learning called transfer learning. While transfer learning has been ubiquitous throughout computer vision applications since the success of ImageNet, it is only since 2017-18 that significant progress has been made for transfer learning in NLP applications. There have been a string of interesting papers in 2018 that discuss the power of language models in natural language understanding and how they can be used to provide pre-trained representations of a language's syntax, which can be far more useful when training a neural network for previously unseen tasks.

Analysis Notebooks

See the included Jupyter notebooks for the stance classification workflow using ULMFit and the OpenAI transformer.

Method 1: ULMFiT

ulmfit.ipynb: (LSTM-based approach)

Method 2: OpenAI Transformer

transformer.ipynb: (Transformer-based approach)

Module Installation

The below sections highlight the installation steps for each approach used. Python 3.6+ and PyTorch 1.0.0 is used for all the work shown.

Set up virtual environment:

python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt

Once virtual environment has been set up, activate it for further development.

source venv/bin/activate

PyTorch requirements

Install the latest version of pytorch (1.0+) as shown below:

pip3 install -r pytorch-requirements.txt

ULMFit with the fastai framework

This utilizes the fastai framework (built on top of PyTorch) to perform stance classification.

The notebook ulmfit.ipynb uses v1 of fastai, which has been refactored for efficiency and updated to move forward with future PyTorch versions (1.0+).

Install fastai as shown below:

pip3 install fastai

spaCy language model

For tokenization, fastai uses the SpaCy library's English language model. This has to be downloaded manually:

python3 -m spacy download en 

Evaluation

To evaluate the F1 score as per the SemEval 2016 Task 6 guidelines, use the perl script given in data/eval/ as shown:

perl eval.pl -u

---------------------------
Usage:
perl eval.pl goldFile guessFile

goldFile:  file containing gold standards;
guessFile: file containing your prediction.

These two files have the same format:
ID<Tab>Target<Tab>Tweet<Tab>Stance
Only stance labels may be different between them!
---------------------------
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].