Code Monkey home page Code Monkey logo

snlp_olidv1.0's Introduction

SNLP_OLIDv1.0

I tried out several machine learning approaches with different features and several types of BERT models in order to find the best solution for predicting offensive speech in tweets. The OffensEval 2019 Dataset of SemEval 2019 - Task 6 was used for this purpose. Four machine learning models including Logistic Regression, Random Forest, Neural Network and K-Neighbours Classifier were used based on features from ‘word’-Tf-Idf Vectorizer, and ‘char’-Tf-Idf vectorizer. Comparisons between models and hyperparameters were done. The best model using features of ‘char’-Tf-Idf Method was Random Forest, giving almost 0.75 accuracy and 0.71 F1 score; all models within ‘word’-Tf-Idf method showed rather equal results (≈ 0.68) with a maximum difference of 1.5 %.

The results show that the approach implemented using the BERT architectures, produced a model with the best results on both the training as well as the test sets. The best BERT model outperforms the best machine learning model by 7% in accuracy and 8% in macro avereged F-Score.


The code for machine learning models is to be find in a file called olidTask_snlp(ML_models).ipynb, the code for models using Simple Transformers is in the file olidTask_snlp(SimpleTransformer_models).ipynb.

snlp_olidv1.0's People

Contributors

stewieboomhauer 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.