1. 程式人生 > >How to visualize decision tree

How to visualize decision tree

The scikit tree does a good job of representing the tree structure, but we have a few quibbles. The colors aren't the best and it's not immediately obvious why some of the nodes are colored and some aren't. If the colors represent predicted class for this classifier, one would think just the leaves would be colored because only leaves have predictions. The count of samples of the various target classes in each node is somewhat useful, but a histogram would be even better. A target class color legend would be nice.