Tree Plot

In [16]:
from verticapy.learn.ensemble import RandomForestClassifier
model = RandomForestClassifier(name = "public.RF_iris",
                               n_estimators = 20,
                               max_features = "auto",
                               max_leaf_nodes = 32, 
                               sample = 0.7,
                               max_depth = 3,
                               min_samples_leaf = 5,
                               min_info_gain = 0.0,
                               nbins = 32)
model.drop()
model.fit("public.iris", 
          ["PetalLengthCm", "PetalWidthCm"], 
          "Species")
graphviz_fmt = model.export_graphviz()

from graphviz import Source
Source(graphviz_fmt)