Code Monkey home page Code Monkey logo

ml_media-and-judging's Introduction

Media-And-Judging

Description

This is a binary classification task using machine learning models to predict judge's adjudication on asylum court. We further generated and quantified textual features extracted from New York Times and Wikileaks corpus using NLP tools including fasttext for language model, n-grams, and tf-idf.

In feature_engineering folder, we presented a way to reduce the dimension and sparsity of textual features using language model and k-means clustering. In train folder, we are developing a machine learning task abstraction which aims to be reused for following tasks. The script for task abstraction is in ./train/model.py, and the driver script is ./train/train.py.

Requirments

  1. Python 3.6
  2. fasttext
  3. Scikit-learn 0.19.1

Usage

  1. Run training model: (Using final dataset)

    $ sh runtrain.sh

    The model result will be output to train/model_result/[DecisionTree | RandomForest]/.

    The feature importance, and ROC_AUC accuracy for each model setting is saved under this folder for each running.

Result

We used random forest to traing on data with feature sets: asylum court case and news group in time series manner.

We reached 0.89 roc auc score after rounding.

Table of Content

  • Data-Preprocessing:

    1. Scrape nytimes
    2. Scrape wikileaks
    3. Join case data
  • Featurization:

    1. Feature Engineering
  • train:

    1. Training pipeline starts here, the scripts only support DecisionTree and RandomForest now
    2. Please make sure directories are created : model_results/[DecisionTree | RandomForest] under the train directory
  • analysis:

    1. Model analysis, and findings in data

ml_media-and-judging's People

Contributors

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