pm4py.filtering.filter_ocel_cc_otype#

pm4py.filtering.filter_ocel_cc_otype(ocel: OCEL, otype: str, positive: bool = True) OCEL[source]#

Filters the objects belonging to connected components that have at least one object of the specified type.

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

Return type:

OCEL

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

  • otype (str) – Object type to consider.

  • positive (bool) – Boolean indicating whether to keep (True) or discard (False) the objects in these components.

Returns:

Filtered OCEL.

import pm4py

ocel = pm4py.read_ocel('log.jsonocel')
filtered_ocel = pm4py.filter_ocel_cc_otype(
    ocel,
    'order'
)