5 ms·
How to Visualize Decision Trees
- jononor 5y agoVery nice work. Glad to see both classification and regression treated very well, with careful attention to design to make something that is easy to understand. Now the question is - can we build on this (or do something analogous) for tree ensembles? Random Forests, Gradient Boosted Trees etc. Quite common to use that to gain predictive accuracy, though interpretability/explainability tends to suffer considerably.
- parrt 5y agoThanks! It took forever to bash my way to victory on that trees. The lib also supports the shallow trees in boosting machines.
- julbook 5y agoGreat explanation; I understand different visual tree orientations. I agree with the lesson learned section; it's not about programming alone but also about determining the ecosystem's capabilities.
- mistrial9 5y agokudos for the clean HTML document
- parrt 5y agoThanks. It's morphed over time as we add functionality so it's less clean than before.
- parrt 5y agoAlso note we recently added 1D and 2D classifier decision boundary plots. See https://github.com/parrt/dtreeviz/blob/master/notebooks/classifier-decision-boundaries.ipynb https://github.com/parrt/dtreeviz/blob/master/notebooks/clas...
- Torwald 5y agoIn the "Default scikit Iris visualization" example you could colorize the arrows for true|false since colors are available. Alternatively you could use two distinct types of arrowheads.
- parrt 5y agoThat's a good idea. thanks!
- niyyou 5y agoAnd his visualization of constrained optimization is astonishing https://explained.ai/regularization/index.html https://explained.ai/regularization/index.html (I struggled for a long time to get the right intuition of a Lagrangian)
- parrt 5y agoThanks! Took me a year to discover the key nut there. L1 vs L2 regularization is not well described I found so I went nuts trying to nail it down.
- bravura 5y agoIf you're interested, in my thesis I induced l1-regularized decision trees through a boosting style approach. Adding an l1 term and maximizing the gradient led to sparse tree.
- graphviz 5y agonice