pm4py.filtering.filter_ocel_object_types_allowed_activities#

pm4py.filtering.filter_ocel_object_types_allowed_activities(ocel: OCEL, correspondence_dict: Dict[str, Collection[str]]) OCEL[source]#

Filters an object-centric event log keeping only the specified object types with the specified activity set (filters out the rest).

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

  • correspondence_dict – dictionary containing, for every object type of interest, a collection of allowed activities. Example: {“order”: [“Create Order”], “element”: [“Create Order”, “Create Delivery”]}

Return type:

OCEL

import pm4py

filtered_ocel = pm4py.filter_ocel_object_types_allowed_activities(ocel, {'order': ['create order', 'pay order'], 'item})