Skip to content
simple customizable risk scores in python
Branch: master
Clone or download
Berk Ustun
Latest commit ec41e64 May 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
batch
examples fixed minor bugs with merge May 17, 2019
images added example for seizure prediction Mar 17, 2018
riskslim fixed minor issue with print_model where it was showing the wrong fun… May 17, 2019
.gitignore general cleanup Mar 31, 2018
LICENSE added ex_03_constraints to show how to add operational constraints; m… Nov 4, 2017
MANIFEST.in working version; needs a lot of clean-up Feb 20, 2017
README.md Update README.md Feb 5, 2019
requirements.txt refactoring and cleanup Jun 4, 2018
setup.py general cleanup Mar 31, 2018

README.md

risk-slim

risk-slim is a machine learning method to create customized risk scores in python.

Background

Risk scores are simple tools that let users make quick risk predictions by adding and subtracting a few small numbers (see e.g., medical risk scores at www.mdcalc.com or the mdcalc iOS app).

Video

RiskSLIM KDD

Customized Risk Score for ICU seizure prediction

Here is a risk score for ICU risk prediction that is described in our paper.

Paper

If you use risk-slim for in your research, please cite our paper:

@inproceedings{ustun2017kdd,
	Author = {Ustun, Berk and Rudin, Cynthia},
	Booktitle = {Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
	Organization = {ACM},
	Title = {{Optimized Risk Scores}},
	Year = {2017}}
}

Package Details

NOTE: THIS PACKAGE IS CURRENTLY UNDER DEVELOPMENT. THE CODE MAY CHANGE WITH EACH COMMIT.

Installation

Run the following snippet to install risk-slim in a Mac/Unix environment, and complete a test run.

git clone https://github.com/ustunb/risk-slim
cd risk-slim
pip install -e . #install in editable mode  
bash batch/job_template.sh #batch run

Requirements

  • Python 3.5+
  • CPLEX 12.6+

The code may still work with older versions of Python and CPLEX, but this will not be tested or supported. If you're hesitant about switching to Python 3, check out this migration guide

CPLEX

CPLEX is cross-platform commercial optimization tool with a Python API. It is free for students and faculty members at accredited institutions. To get CPLEX:

  1. Register for IBM OnTheHub
  2. Download the IBM ILOG CPLEX Optimization Studio from the software catalog
  3. Install the CPLEX Optimization Studio.
  4. Setup the CPLEX Python API as described here.

If you have problems installing CPLEX, check the CPLEX user manual or the CPLEX forums.

Development Roadmap

If you are interested in contributing, please reach out!

  • simplify installation
  • convenience functions for batch computing
  • refactoring package for future development
  • sci-kit learn API (as of 10/11/2018)
  • reporting tools (roc curves, calibration plots, model reports)
  • support for open source solver
  • documentation
You can’t perform that action at this time.