Decision Tree Visualization

This page contains a guide the many options for visualizing tree learners.

Interactive Visualizations

Tree Visualization

The write_html function allows you to construct an interactive browser visualization of a tree learner:

IAI.write_html("tree.html", lnr)
Optimal Trees Visualization

In a Jupyter notebook, tree learners are automatically visualized in this way. If you are working from a terminal, you can open a browser window with a visualization of any tree learner using show_in_browser.

You can include the data in the interactive visualization using the data keyword argument:

IAI.write_html("tree_with_data.html", lnr, data=(X, y))
Optimal Trees Visualization