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', rankdir: str = 'LR')[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 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, sumformat (
str
) – The format of the output visualization (if html is provided, GraphvizJS is used to render the visualization in an HTML page)bgcolor (
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.view_ocdfg(ocdfg, annotation='frequency', format='svg')