GithubHelp home page GithubHelp logo

samuelrince / twitter_bot_detection Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 32 KB

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.

Python 100.00%

twitter_bot_detection's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.