pm4py.algo.reduction.process_tree.variants.tree_tr_based module#

class pm4py.algo.reduction.process_tree.variants.tree_tr_based.Outputs(*values)[source]#

Bases: Enum

DFG = 'dfg'#
SEQUENCE = 'sequence'#
PARALLEL = 'parallel'#
START_ACTIVITIES = 'start_activities'#
END_ACTIVITIES = 'end_activities'#
ACTIVITIES = 'activities'#
SKIPPABLE = 'skippable'#
ACTIVITIES_ALWAYS_HAPPENING = 'activities_always_happening'#
MIN_TRACE_LENGTH = 'min_trace_length'#
TRACE = 'trace'#
class pm4py.algo.reduction.process_tree.variants.tree_tr_based.Parameters(*values)[source]#

Bases: Enum

ACTIVITY_KEY = 'pm4py:param:activity_key'#
pm4py.algo.reduction.process_tree.variants.tree_tr_based.apply(tree: ProcessTree, trace: Trace, parameters: Dict[Any, Any] | None = None, **kwargs) ProcessTree[source]#

Reduce a process tree replacing the skippable elements that have empty intersection with the trace.

Parameters:
  • tree – Process tree

  • trace – Trace of an event log

  • parameters – Parameters of the algorithm, possible values: Parameters.ACTIVITY_KEY

Returns:

Reduced process tree

Return type:

tree

pm4py.algo.reduction.process_tree.variants.tree_tr_based.reduce(bottomup_nodes: List[ProcessTree], fps: Dict[str, Any], activities: Set[str]) ProcessTree[source]#

Reduce a process tree replacing the skippable elements that have empty intersection with the trace.

Parameters:
  • bottomup_nodes – List of nodes of the process tree (that are process trees by themselves) in a bottomup order

  • fps – Footprints of the process tree

  • activities – Set of activities in the trace

Returns:

Reduced process tree

Return type:

tree