pm4py.ocel.sample_ocel_connected_components#
- pm4py.ocel.sample_ocel_connected_components(ocel: OCEL, connected_components: int = 1) OCEL [source]#
Given an object-centric event log, returns a sampled event log with a subset of the executions. The number of considered connected components need to be specified by the user.
- Parameters:
ocel (
OCEL
) – Object-centric event logconnected_components (
int
) – Number of connected components to pick from the OCEL
- Return type:
OCEL
import pm4py ocel = pm4py.read_ocel('trial.ocel') sampled_ocel = pm4py.sample_ocel_connected_components(ocel, 5) # keeps only 5 connected components