Coder Social home page Coder Social logo

ecsalomon / triage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dssg/triage

1.0 2.0 0.0 9.21 MB

General Purpose Risk Modeling and Prediction Toolkit for Policy and Social Good Problems

License: Other

Shell 0.26% Python 53.89% Jupyter Notebook 45.74% Mako 0.02% PLpgSQL 0.08%

triage's Introduction

Triage

Risk modeling and prediction

https://travis-ci.org/dssg/triage.svg?branch=master https://codeclimate.com/github/dssg/triage.png

Predictive analytics projects require the coordination of many different tasks, such as feature generation, classifier training, evaluation, and list generation. These tasks are complicated in their own right, but in addition have to be combined in different ways throughout the course of the project.

Triage aims to provide interfaces to these different phases of a project, such as an Experiment. Each phase is defined by configuration specific to the needs of the project, and an arrangement of core data science components that work together to produce the output of that phase.

Installation

Prerequisites

To use Triage, you first need:

  • Python 3+
  • A PostgreSQL database with your source data (events, geographical data, etc) loaded.
  • Ample space on an available disk, (or for example in Amazon Web Services's S3), to store the needed matrices and models for your experiment

Building

Triage is a Python package distributable via setuptools. It may be installed directly using easy_install or pip, or named as a dependency of another package as triage.

To build this package (without installation), its dependencies may alternatively be installed from the terminal using pip:

pip install -r requirement/main.txt

Testing

To add test (and development) dependencies, use test.txt:

pip install -r requirement/test.txt [-r requirement/dev.txt]

Then, to run tests:

pytest

Development

To quickly bootstrap a development environment, having cloned the repository, invoke the executable develop script from your system shell:

./develop

A "wizard" will suggest set-up steps and optionally execute these, for example:

(install) begin

(pyenv) installed ✓

(python-3.6.2) installed ✓

(virtualenv) installed ✓

(activation) installed ✓

(libs) install?
1) yes, install {pip install -r requirement/main.txt -r requirement/test.txt -r requirement/dev.txt}
2) no, ignore
#? 1

Experiment

The first phase implemented in Triage is the Experiment. An experiment represents the initial research work of creating design matrices from source data, and training/testing/evaluating a model grid on those matrices. At the end of the experiment, a relational database with results metadata is populated, allowing for evaluation by the researcher.

Documentation

Background

Triage is developed at the University of Chicago's Center For Data Science and Public Policy. We created it in response to commonly occuring challenges we've encountered and patterns we've developed while working on projects for our partners.

Major Components Used by Triage

Triage makes use of many core data science components developed at DSaPP. These components can be useful in their own right, and are worth checking out if you'd like to make use of a subset of Triage's functionality in an existing pipeline.

Components Within Triage

  • Architect: Plan, design and build train and test matrices. Includes feature and label generation.
  • Catwalk: Training, testing, and evaluating machine learning classifier models
  • Collate: Aggregation SQL Query Builder. This is used by the Architect to build features.
  • Timechop: Generate temporal cross-validation time windows for matrix creation
  • Metta-Data: Train and test matrix storage
  • Results Schema: Generate a database schema suitable for storing the results of modeling runs

Design Goals

There are two overarching design goals for Triage:

  • All configuration necessary to run the full experiment from the external interface (ie, Experiment subclasses) from beginning to end must be easily serializable and machine-constructable, to allow the eventual development of tools for users to design experiments.
  • All core functionality must be usable outside of a specific pipeline context or workflow manager. There are many good workflow managers; everybody has their favorite, and core functionality should not be designed to work with specific execution expectations.

Future Plans

  • Generation and Management of lists (ie for inspections) by various criteria
  • Integration of components with various workflow managers, like Drain and Luigi.
  • Comprehensive leakage testing of an experiment's modeling run
  • Feature Generation Wizard

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.