3.3. Other cool dataviz libraries#

3.3.1. PyBaobab for much better decision tree visualizations#

PyBaobabdt is a wonderful Python package to visualize decision trees using Sankey diagrams. For a tree classifier, each class is represented with a color, and the width of each link (or root) represents the number of samples in each class.

The trees can become as beautiful as you want by controlling the max_depth parameter.

The link to the package in the comments👇

3.3.3. Mlextend - plot decision boundaries of classifiers#

One of the most fun things you can do with your classifier is plot its decision boundaries. But, you will quickly realize that the code to generate such a plot is, put mildly, a giant pain in the keyboard.

Fortunately, the mlextend package collapses all that code into a function, so that you can draw decision boundaries of any classifier in a single line of code👇