pm4py.filtering.filter_ocel_object_per_type_count#
- pm4py.filtering.filter_ocel_object_per_type_count(ocel: OCEL, min_num_obj_type: Dict[str, int]) OCEL [source]#
Filters the events of the object-centric logs which are related to at least the specified amount of objects per type.
E.g. pm4py.filter_object_per_type_count(ocel, {“order”: 1, “element”: 2})
Would keep the following events:
ocel:eid ocel:timestamp ocel:activity ocel:type:element ocel:type:order
0 e1 1980-01-01 Create Order [i4, i1, i3, i2] [o1] 1 e11 1981-01-01 Create Order [i6, i5] [o2] 2 e14 1981-01-04 Create Order [i8, i7] [o3]
- Parameters:
ocel (
OCEL
) – object-centric event logmin_num_obj_type – minimum number of objects per type
- Return type:
OCEL
import pm4py filtered_ocel = pm4py.filter_ocel_object_per_type_count(ocel, {'order': 1, 'element': 2})