March 2019
Beginner to intermediate
288 pages
6h 21m
English
Decision tree algorithms are very commonly-used supervised learning algorithm models for classification and regression tasks. In this section, we will show how you can visualize decision tree classifiers to better understand their logic.
Decision tree classifiers build a sequence of simple if/else rulings on data through the use of which they can then predict the target value.
Decision trees are usually simpler to interpret because of their structure and the ability we have to visualize the modeled tree, using modules such as the sklearn export_graphviz function.
The following standard Python code can be used to visualize the decision tree model that we previously built in our notebook:
!pip install graphviz
Read now
Unlock full access