Skip to content
No description, website, or topics provided.
Python Shell
Branch: master
Clone or download
Osbert Bastani
Osbert Bastani initial commit
Latest commit 4166c4c Nov 2, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data initial commit Nov 2, 2017
python/dtextract initial commit Nov 2, 2017
.gitignore
COPYRIGHT initial commit Nov 2, 2017
LICENSE initial commit Nov 2, 2017
README.md initial commit Nov 2, 2017
cleanup.sh initial commit Nov 2, 2017
setup.sh initial commit Nov 2, 2017

README.md

Decision Tree Extraction (DTExtract)

DTExtract is a tool for extracting model explanations in the form of decision trees. More precisely, given

  • blackbox access to a model (i.e., for a given input, produce the corresponding output),
  • a sampling distribution over the input space,

then DTExtract constructs a decision tree approximating that model.

Table of Contents

  1. Prerequisites
  2. Setting Up DTExtract
  3. Using DTExtract

Prerequisites

DTExtract has been tested using Python 2.7. DTExtract depends on numpy, scipy, scikit-learn, and pandas.

Setting Up DTExtract

Run setup.sh to set up the datasets used in the examples that come with DTExtract.

Using DTExtract

See python/dtextract/examples/iris.py for an example using a dataset from the UCI machine learning repository with the goal of classifying Iris flowers. The dataset is located at data/iris.zip (download link). To run this example, run

$ cd python
$ python -m dtextract.examples.iris

Similarly, see python/dtextract/examples/diabetes.py for an example using a diabetes readmissions dataset. The dataset is located at data/dataset_diabetes.zip (download link). To run this example, run

$ cd python
$ python -m dtextract.examples.diabetes

Finally, see python/dtextract/examples/wine.py for an example using a dataset from the UCI machine learning repository with the goal of classifying wines. The dataset is located at data/wine.zip (download link). To run this example, run

$ cd python
$ python -m dtextract.examples.wine
You can’t perform that action at this time.