Following is my code:
from sklearn import tree
from dtreeviz.trees import dtreeviz # will be used for tree visualization
from matplotlib import pyplot as plt
import graphviz
ax2 = dtreeviz(
RFC1.estimators_[0],
X_train1, y_train1, target_name='Mask',
scale=1.1, class_names=['0','1'])
ax2
As I am working on jupyter notebook so I can see the graph as soon as I run ax2
. I want to save this output to on my local system in PNG format BUT I can find a way to do this!