- pm4py.ocel.sample_ocel_objects(ocel: OCEL, num_objects: int) OCEL #
Given an object-centric event log, returns a sampled event log with a subset of the objects that is chosen in a random way. Only the events related to at least one of these objects are filtered from the event log. As a note, the relationships between the different objects are probably going to be ruined by this sampling.
OCEL) – Object-centric event log
int) – Number of objects of the object-centric event log
- Return type:
import pm4py ocel = pm4py.read_ocel('trial.ocel') sampled_ocel = pm4py.sample_ocel_objects(ocel, 50) # keeps only 50 random objects