pm4py.ocel.cluster_equivalent_ocel#
- pm4py.ocel.cluster_equivalent_ocel(ocel: OCEL, object_type: str, max_objs: int = 9223372036854775807) Dict[str, Collection[OCEL]] [source]#
Clusters the object-centric event log based on the ‘executions’ of a single object type. Equivalent ‘executions’ are grouped together in the output dictionary.
- Parameters:
ocel (OCEL) – Object-centric event log.
object_type (str) – Reference object type for clustering.
max_objs (int) – Maximum number of objects (of the specified object type) to include per cluster. Defaults to sys.maxsize.
- Returns:
Dictionary mapping cluster descriptions to collections of equivalent OCELs.
- Return type:
Dict[str, Collection[OCEL]]
import pm4py ocel = pm4py.read_ocel('trial.ocel') clusters = pm4py.cluster_equivalent_ocel(ocel, "order")