pm4py.ocel.cluster_equivalent_ocel#

pm4py.ocel.cluster_equivalent_ocel(ocel: OCEL, object_type: str, max_objs: int = 9223372036854775807) Dict[str, Collection[OCEL]][source]#

Perform a clustering of the object-centric event log, based on the ‘executions’ of a single object type. Equivalent ‘executions’ are grouped in the output dictionary.

Parameters:
  • ocel (OCEL) – object-centric event log

  • object_type (str) – reference object type

  • max_objs (int) – maximum number of objects (of the given object type)

Return type:

Dict[str, Collection[OCEL]]

import pm4py

ocel = pm4py.read_ocel('trial.ocel')
clusters = pm4py.cluster_equivalent_ocel(ocel, "order")