Skip to content

Student project made during the deep learning class at CentraleSupélec. The project is about developing a Twitter bot detection model compliant with real time analysis and single tweet data.

samuelrince/twitter_bot_detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter bot detection from a single tweet

Student project made during the deep learning class at CentraleSupélec. The project is about developing a Twitter bot detection model compliant with real time analysis and single tweet data.

Intallation

Please first install poetry package manager in order to install dependencies.

Then run the following command to create your python environments and install all the dependencies (python > 3.8.x required):

poetry install

Usage

This package can train 2 types of models, a LSTM-based and a Bert-based. To do training it is required to first download the data from Google Drive and put it in the data directory. The models are also available in the Google Drive directory.

To train a LSTM please consider the following example commands:

python lstm.py \
  --cuda \
  --data ./data \
  --save-dir ./models/lstm \
  --log-interval 500 \
  --epochs 15 \
  --batch-size 32 \
  --seq-len 64 \
  --emsize 200 \
  --nhid 200 \
  --nlayers 2 \
  --dropout 0.5 \
  --lr 0.0001 \
  --clip 5.

To train a Bert model:

python bert.py \
  --cuda \
  --data ./data \
  --save-dir ./models/bert \
  --log-interval 200 \
  --epochs 2 \
  --batch-size 32 \
  --seq-len 64 \
  --lr 0.00001 \
  --eps 0.00000001

About

Student project made during the deep learning class at CentraleSupélec. The project is about developing a Twitter bot detection model compliant with real time analysis and single tweet data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages