pm4py.visualization.decisiontree package

Submodules

pm4py.visualization.decisiontree.visualizer module

class pm4py.visualization.decisiontree.visualizer.Variants(value)[source]

Bases: enum.Enum

An enumeration.

CLASSIC = <module 'pm4py.visualization.decisiontree.variants.classic' from 'C:\\Users\\berti\\FRAUNHOFER\\pm4py-core\\pm4py\\visualization\\decisiontree\\variants\\classic.py'>
pm4py.visualization.decisiontree.visualizer.apply(clf, feature_names, classes, parameters=None, variant=<Variants.CLASSIC: <module 'pm4py.visualization.decisiontree.variants.classic' from 'C:\\Users\\berti\\FRAUNHOFER\\pm4py-core\\pm4py\\visualization\\decisiontree\\variants\\classic.py'>>)[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.matplotlib_view(gviz)[source]

Views the diagram using Matplotlib

Parameters

gviz – Graphviz

pm4py.visualization.decisiontree.visualizer.save(gviz, output_file_path)[source]

Save the diagram

Parameters
  • gviz – GraphViz diagram

  • output_file_path – Path where the GraphViz output should be saved

pm4py.visualization.decisiontree.visualizer.view(gviz)[source]

View the diagram

Parameters

gviz – GraphViz diagram

Module contents