pm4py.vis.view_ocdfg#

pm4py.vis.view_ocdfg(ocdfg: Dict[str, Any], annotation: str = 'frequency', act_metric: str = 'events', edge_metric='event_couples', act_threshold: int = 0, edge_threshold: int = 0, performance_aggregation: str = 'mean', format: str = 'png', bgcolor: str = 'white')[source]#

Views an OC-DFG (object-centric directly-follows graph) with the provided configuration.

Object-centric directly-follows multigraphs are a composition of directly-follows graphs for the single object type, which can be annotated with different metrics considering the entities of an object-centric event log (i.e., events, unique objects, total objects).

Parameters:
  • ocdfg – Object-centric directly-follows graph

  • annotation (str) – The annotation to use for the visualization. Values: - “frequency”: frequency annotation - “performance”: performance annotation

  • act_metric (str) – The metric to use for the activities. Available values: - “events” => number of events (default) - “unique_objects” => number of unique objects - “total_objects” => number of total objects

  • edge_metric (str) – The metric to use for the edges. Available values: - “event_couples” => number of event couples (default) - “unique_objects” => number of unique objects - “total_objects” => number of total objects

  • act_threshold (int) – The threshold to apply on the activities frequency (default: 0). Only activities having a frequency >= than this are kept in the graph.

  • edge_threshold (int) – The threshold to apply on the edges frequency (default 0). Only edges having a frequency >= than this are kept in the graph.

  • performance_aggregation (str) – The aggregation measure to use for the performance: mean, median, min, max, sum

  • format (str) – The format of the output visualization (default: “png”)

  • bgcolor (str) – Background color of the visualization (default: white)

import pm4py

ocdfg = pm4py.discover_ocdfg(ocel)
pm4py.view_ocdfg(ocdfg, annotation='frequency', format='svg')