Git Product home page Git Product logo

kaggle-toxic_comment's Introduction

Kaggle Jigsaw Toxic Comment, 34th / 4551 (Top 1%) Solution

See a detailed methodology at https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge/discussion/52645.

~~

To reproduce the final solution, download data from https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge/data and put it in data folder, make a cache and submit folder. Download Neptune models from https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge/discussion/51836. Zafar's cleaned data comes from https://www.kaggle.com/fizzbuzz/toxic-data-preprocessing/code. You also will have to download embedding files. (See more setup.txt.)

Run pip install -r requirements.txt, and then run all the models:

python lr.py
python fe_lgb.py
python sparse_lgb.py
python sparse_fe_lgb.py
python gru.py
python gru2.py
python gru80.py
python gru128.py
python gru128-2.py
python gru-conv.py
python double-gru.py
python 2dconv.py
python lstm-conv.py
python dpcnn.py
python rnncnn.py
python rnncnn2.py
python capsule_net.py
python attention-lstm.py
python fm.py
python ridge.py
python neptune-ml-models.py
python lvl2_final_cnn.py
python lvl2_final_lgb.py

After that, you will have a final submission ready to go. cache.py and cv.py maintain the model run layer and are imported, not called directly. feature_engineering.py contains all the feature engineering, and is imported and run as needed. preprocess.py and utils.py contain additional functions that are used by the models.

lvl3_hillclimb_average.py should be run after python lvl2_final_lgb.py to find optimal weights. These weights are then manually normalized to sum up to 1 and then manually put back into python lvl2_final_lgb.py.

relative_word_frequency_analysis.py identifies words that are more frequently found in toxic than non-toxic comments. It was used to inform the word list found in feature_engineering.py.

conversationai_api.py contains our attempt to query the PerspectiveAPI for data. This ended up being unhelpful. To run this, you will need to set up API access.

lr-extra_data.py contains our attempt to run linear regressions on the extra Wikipedia toxicity and agression labels. This ended up being unhelpful.

kaggle-toxic_comment's People

Contributors

peterhurford avatar robertzk avatar

Watchers

 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.