Visualization toolkit for sklearn Decision Trees using graphviz and pydotplus.
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
See examples folder for more examples
See doc folder for:
Run using
python -m pytest
These are just boilerplate to the underlying pydotplus library.
- svg
- jpeg
These will need to be passed in the initialization, same as feature names are now, to dispaly in the tree
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
- 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.