CaseCal / TreeViz

Visualization toolkit for sklearn Decision Trees using graphviz and pydotplus.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

TreeViz

Visualization toolkit for sklearn Decision Trees using graphviz and pydotplus.

Installation

TreeViz displays and modifies Decison Trees using GraphViz, an open source graph visualization software. GraphViz must be installed on your machine in a location that pydotplus searches. The installation at Anaconda is a good place to start, as it will add the GraphViz location to PATH in most scenarios.

Once GraphViz is installed, TreeViz can be installed through pip:

pip install -i https://test.pypi.org/simple/ treeviz

Examples

See examples folder for more examples

Documentation

See doc folder for:

Testing

Run using

python -m pytest

Upcoming Additions

Output Formats

These are just boilerplate to the underlying pydotplus library.

  • svg
  • jpeg

Class Names

These will need to be passed in the initialization, same as feature names are now, to dispaly in the tree

More Metrics

The focus is on bespoke metrics that can't be replicated with the custom input, i.e those that require tree-level data

  • Samples as percent of total
  • Test error (Would require new samples)
  • Regression values

Colors

  • ColorBar generators as mentioned above, to allow colot_to_color naming.
  • Implement library (maybe matplotlib?) with color functionality to allow more than just rgb int triples.
  • Add ability for non-linear coloring, such as white in middle or higher alphas at edges, etc.

About

Visualization toolkit for sklearn Decision Trees using graphviz and pydotplus.

License:MIT License


Languages

Language:Python 100.0%