Committed to Open Source… Again

less than 1 minute read

This one’s been in the hopper for a long time! But now, you can grab it on the bleeding-edge version and make your decision tree visualizations totally legit in scikit-learn!

As many of you who head to my blog know, I’m quite the fan of tree-based learning, but have you ever seen scikit-learn’s D-Tree rendering? It used to be pretty basic. Usable and good for introspection of your models, sure. But would you want to show this to a customer (let’s imagine that the customer is a cruise liner from the early 1900’s)?

Boring tree

Fear not! You can now draw some pretty nice trees in scikit-learn using the newly overhauled export_graphviz() function as documented here.

And, with a few options tweaked, the above plot becomes something like this:

Exciting tree


Leave a Comment