Skip to main content

Risk modeling and prediction

Project description

Copyright ©2017. The University of Chicago (“Chicago”). All Rights Reserved.

Permission to use, copy, modify, and distribute this software, including all object code and source code, and any accompanying documentation (together the “Program”) for educational and not-for-profit research purposes, without fee and without a signed licensing agreement, is hereby granted, provided that the above copyright notice, this paragraph and the following three paragraphs appear in all copies, modifications, and distributions. For the avoidance of doubt, educational and not-for-profit research purposes excludes any service or part of selling a service that uses the Program. To obtain a commercial license for the Program, contact the Technology Commercialization and Licensing, Polsky Center for Entrepreneurship and Innovation, University of Chicago, 1452 East 53rd Street, 2nd floor, Chicago, IL 60615.

Created by Data Science and Public Policy, University of Chicago

The Program is copyrighted by Chicago. The Program is supplied "as is", without any accompanying services from Chicago. Chicago does not warrant that the operation of the Program will be uninterrupted or error-free. The end-user understands that the Program was developed for research purposes and is advised not to rely exclusively on the Program for any reason.

IN NO EVENT SHALL CHICAGO BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THE PROGRAM, EVEN IF CHICAGO HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. CHICAGO SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE PROGRAM PROVIDED HEREUNDER IS PROVIDED "AS IS". CHICAGO HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

Description: ======
Triage
======

Risk modeling and prediction

.. image:: https://travis-ci.org/dssg/triage.svg?branch=master
:target: https://travis-ci.org/dssg/triage

.. image:: https://codecov.io/gh/dssg/triage/branch/master/graph/badge.svg
:target: https://codecov.io/gh/dssg/triage

.. image:: https://codeclimate.com/github/dssg/triage.png
:target: https://codeclimate.com/github/dssg/triage

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


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
---------------------------
- `Dirty Duck Tutorial <https://dssg.github.io/dirtyduck/>`_
- `Running an Experiment <https://dssg.github.io/triage/experiments/running>`_
- `Experiment Algorithm Deep Dive <https://dssg.github.io/triage/experiments/algorithm>`_
- `Experiment Config v5 Upgrade Guide <https://dssg.github.io/triage/experiments/upgrade-to-v5>`_


Background
==========

Triage is developed at the University of Chicago's `Center For Data Science and Public Policy <http://dsapp.uchicago.edu>`_. 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 <src/triage/component/architect>`_: Plan, design and build train and test matrices. Includes feature and label generation.
* `Catwalk <src/triage/component/catwalk>`_: Training, testing, and evaluating machine learning classifier models
* `Collate <src/triage/component/collate>`_: Aggregation SQL Query Builder. This is used by the Architect to build features.
* `Timechop <src/triage/component/timechop>`_: Generate temporal cross-validation time windows for matrix creation
* `Metta-Data <src/triage/component/metta>`_: Train and test matrix storage
* `Results Schema <src/triage/component/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 <https://github.com/dssg/drain>`_ and `Luigi <https://github.com/spotify/luigi>`_.
- Comprehensive leakage testing of an experiment's modeling run
- Feature Generation Wizard

Keywords: triage
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Provides-Extra: rq

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

triage-2.2.0.tar.gz (378.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

triage-2.2.0-py3.6.egg (406.5 kB view details)

Uploaded Egg

triage-2.2.0-py2.py3-none-any.whl (135.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file triage-2.2.0.tar.gz.

File metadata

  • Download URL: triage-2.2.0.tar.gz
  • Upload date:
  • Size: 378.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for triage-2.2.0.tar.gz
Algorithm Hash digest
SHA256 8e7ded0e861a37f29a4cc2b1670cb6b744c901c2a754cc830426d13be2fa6ef7
MD5 b658e4d984d617c9ef97d00f2988388c
BLAKE2b-256 cf4bcf3c1c3f1c9bbff8fe5c89b89285ec583ed10904446d63727348af044bac

See more details on using hashes here.

File details

Details for the file triage-2.2.0-py3.6.egg.

File metadata

  • Download URL: triage-2.2.0-py3.6.egg
  • Upload date:
  • Size: 406.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

File hashes

Hashes for triage-2.2.0-py3.6.egg
Algorithm Hash digest
SHA256 d44809a7a995f73e242a0ff7ba1d0ad3b91212c8918f281a1687524c6f614ebe
MD5 574268b45fea8fd8a0a3b30e2b0a821f
BLAKE2b-256 ecce97e1dd5f869745ef80d2ed294d3c15c1214b048c5504a0ecb1898b7ca6aa

See more details on using hashes here.

File details

Details for the file triage-2.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for triage-2.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d53a9482cf9c3d2b7c2a40560071947c64c0b93f8f6d920bd4c84b922b792b90
MD5 a746d12b58ef7c7ea22cd87150e4656d
BLAKE2b-256 a9cac906e0e3411c7da39336e689d9bb91603e1991ed1156259fffa723ef741b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page