Giter Club home page Giter Club logo

graines's Introduction

graines

Classification of Twitter users using multimodal embeddings

Download the code

git clone https://github.com/medialab/graines.git
cd graines

Install requirements

  • create a virtual environment with python 3.8
  • activate it
  • run pip install -r requirements.txt

Create the ground truth

  • Move the non_graines_metadata.csv and graines_metadata.csv files inside the graines repo
  • run python create_ground_truth.py
  • the ground truth is saved in a csv file : "graines_et_non_graines.csv". The seeds get the label 1 and the non-seeds the label 0.

Create your own embeddings

Have a look at the tfidf_on_descriptions.py file: the matrix should be saved as a name_of_your_embedding_model.npy matrix, and have exactly 411 rows. Alternatively topo_count.py measures the topoogical features of candidates. The vectors corresponding to each user should be in the same order as the users in graines_et_non_graines.csv. You can run python tfidf_on_descriptions.py to get an example of the embedding matrix.

Run the test

python main.py --model name_of_your_embedding_model (without .npy in the name of the model) The results are run 5 times with a different train/test split.

To save a complete report to results_binary_classif.csv, run

python main.py --model name_of_your_embedding_model --report

To try a different classifier, run

python main.py --model name_of_your_embedding_model --classifier SVM_RBF_kernel

To test the code only on difficult cases, run

python main.py --model name_of_your_embedding_model --objective difficult_cases

Push your code and results

The .gitignore file should prevent you from loading the users personnal data or any Twitter data we collected.

git commit -am "name of your commit"
git push

graines's People

Contributors

bmaz avatar charlesdedampierre avatar jphcoi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.