View source on GitHub |
Plots a decision tree.
tfdf.model_plotter.plot_tree(
tree: tfdf.py_tree.tree.Tree
,
max_depth: Optional[int] = None,
display_options: Optional[tfdf.model_plotter.DisplayOptions
] = None
) -> str
Args | |
---|---|
tree
|
A decision tree. |
max_depth
|
Maximum plotting depth. Makes the plot more readable in case of large trees. |
display_options
|
Dictionary of display options. |
Returns | |
---|---|
The html content displaying the tree. |