pm4py.objects.log.util.sampling module#

pm4py.objects.log.util.sampling.sample_stream(event_log, no_events=100)[source]#

Randomly sample a fixed number of events from the original event log

Parameters:
  • event_log – Event log

  • no_events – Number of events that the sample should have

Returns:

Filtered log

Return type:

newLog

pm4py.objects.log.util.sampling.sample_log(log, no_traces=100)[source]#

Randomly sample a fixed number of traces from the original log

Parameters:
  • log – Log

  • no_traces – Number of traces that the sample should have

Returns:

Filtered log

Return type:

newLog

pm4py.objects.log.util.sampling.sample(log, n=100)[source]#

Randomly sample a fixed number of traces from the original log

Parameters:
  • log – Trace/event log

  • n – Number of elements that the sample should have

Returns:

Filtered log

Return type:

newLog