pm4py.visualization.decisiontree.visualizer module#
- class pm4py.visualization.decisiontree.visualizer.Variants(*values)[source]#
Bases:
Enum- CLASSIC = <module 'pm4py.visualization.decisiontree.variants.classic' from '/Users/chris/Desktop/PIS/pm4py/pm4py/visualization/decisiontree/variants/classic.py'>#
- pm4py.visualization.decisiontree.visualizer.apply(clf: DecisionTreeClassifier, feature_names: List[str], classes: List[str], parameters: Dict[Any, Any] | None = None, variant=Variants.CLASSIC) Source[source]#
Method to apply the visualization of the decision tree
- Parameters:
clf – Decision tree
feature_names – Names of the provided features
classes – Names of the target classes
parameters –
- Possible parameters of the algorithm, including:
Parameters.FORMAT -> Image format (pdf, svg, png …)
variant –
- Variant of the algorithm:
Variants.CLASSIC
- Returns:
GraphViz object
- Return type:
gviz
- pm4py.visualization.decisiontree.visualizer.save(gviz: Source, output_file_path: str, parameters=None)[source]#
Save the diagram
- Parameters:
gviz – GraphViz diagram
output_file_path – Path where the GraphViz output should be saved