Plotting & Export

Visualize a fitted SGT, or export it to other formats.

plot_tree

sgtlearn.plot_tree(estimator, *, X=None, max_depth=None, feature_names=None, class_names=None, label='feature', impurity=False, proportion=False, precision=2, cmap=('#E8A0BF', '#FAC898', '#B3CDE3', '#CCEBC5', '#DECBE4', '#FED9A6', '#FFFFCC', '#E5D8BD'), ax=None, fontsize=None, node_aspect_ratio=2.5, n_hist_bins=20)[source]

Render a fitted SGT estimator with matplotlib (see module docstring).

Parameters:
Return type:

list[Any]

export_graphviz

sgtlearn.export_graphviz()[source]

Serialize the fitted tree as Graphviz DOT (not implemented).

Return type:

None

export_text

sgtlearn.export_text()[source]

Return a human-readable multiline description of the tree (not implemented).

Return type:

None