pm4py.vis.save_vis_ocdfg#
- pm4py.vis.save_vis_ocdfg(ocdfg: Dict[str, Any], file_path: str, annotation: str = 'frequency', act_metric: str = 'events', edge_metric='event_couples', act_threshold: int = 0, edge_threshold: int = 0, performance_aggregation: str = 'mean', bgcolor: str = 'white', rankdir: str = 'LR', **kwargs)[source]#
Saves the visualization of 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
file_path (
str
) – Destination path (including the extension)annotation (
str
) – The annotation to use for the visualization. Values: - “frequency”: frequency annotation - “performance”: performance annotationact_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 objectsedge_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 objectsact_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, sumbgcolor (
str
) – Background color of the visualization (default: white)rankdir (
str
) – sets the direction of the graph (“LR” for left-to-right; “TB” for top-to-bottom)
import pm4py ocdfg = pm4py.discover_ocdfg(ocel) pm4py.save_vis_ocdfg(ocdfg, 'ocdfg.png', annotation='frequency')