pm4py.filtering.filter_ocel_cc_length#

pm4py.filtering.filter_ocel_cc_length(ocel: OCEL, min_cc_length: int, max_cc_length: int) OCEL[source]#

Keeps only the objects in an OCEL belonging to a connected component with a length falling in a specified range

Paper: Adams, Jan Niklas, et al. “Defining cases and variants for object-centric event data.” 2022 4th International Conference on Process Mining (ICPM). IEEE, 2022.

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

  • min_cc_length (int) – minimum allowed length for the connected component

  • max_cc_length (int) – maximum allowed length for the connected component

Return type:

OCEL

import pm4py

ocel = pm4py.read_ocel('log.jsonocel')
filtered_ocel = pm4py.filter_ocel_cc_length(ocel, 2, 10)