pm4py.filtering#

The pm4py.filtering module contains the filtering features offered in pm4py.

Functions

filter_activities_rework(log, activity[, ...])

Filters the event log, keeping cases where the specified activity occurs at least min_occurrences times.

filter_activity_done_different_resources(...)

Filters the cases where an activity is performed by different resources multiple times.

filter_between(log, act1, act2[, ...])

Finds all the sub-cases leading from an event with activity "act1" to an event with activity "act2" in the log, and returns a log containing only them.

filter_case_performance(log, ...[, ...])

Filters the event log, keeping cases that have a duration (the timestamp of the last event minus the timestamp of the first event) between min_performance and max_performance.

filter_case_size(log, min_size, max_size[, ...])

Filters the event log, keeping cases that have a length (number of events) between min_size and max_size.

filter_directly_follows_relation(log, relations)

Retains traces that contain any of the specified 'directly follows' relations.

filter_end_activities(log, activities[, ...])

Filters cases that have an end activity in the provided list.

filter_event_attribute_values(log, ...[, ...])

Filters a log object based on the values of a specified event attribute.

filter_eventually_follows_relation(log, ...)

Retains traces that contain any of the specified 'eventually follows' relations.

filter_four_eyes_principle(log, activity1, ...)

Filters out the cases of the log that violate the four-eyes principle on the provided activities.

filter_log_relative_occurrence_event_attribute(...)

Filters the event log, keeping only the events that have an attribute value which occurs: - in at least the specified (min_relative_stake) percentage of events when level="events", - in at least the specified (min_relative_stake) percentage of cases when level="cases".

filter_ocel_activities_connected_object_type(...)

Filter an OCEL on the set of activities executed on objects of the given object type.

filter_ocel_cc_activity(ocel, activity)

Filters the objects belonging to connected components that include at least one event with the specified activity.

filter_ocel_cc_length(ocel, min_cc_length, ...)

Keeps only the objects in an OCEL belonging to a connected component with a length falling within the specified range.

filter_ocel_cc_object(ocel, object_id[, ...])

Returns the connected component of the object-centric event log to which the specified object belongs.

filter_ocel_cc_otype(ocel, otype[, positive])

Filters the objects belonging to connected components that have at least one object of the specified type.

filter_ocel_end_events_per_object_type(ocel, ...)

Filters the events in which an object of the given object type terminates its lifecycle.

filter_ocel_event_attribute(ocel, ...[, ...])

Filters the object-centric event log based on the provided event attribute values.

filter_ocel_events(ocel, event_identifiers)

Filters the event identifiers of an object-centric event log.

filter_ocel_events_timestamp(ocel, ...[, ...])

Filters the object-centric event log, keeping events within the provided timestamp range.

filter_ocel_object_attribute(ocel, ...[, ...])

Filters the object-centric event log based on the provided object attribute values.

filter_ocel_object_per_type_count(ocel, ...)

Filters the events of the object-centric logs that are related to at least the specified number of objects per type.

filter_ocel_object_types(ocel, obj_types[, ...])

Filters the object types of an object-centric event log.

filter_ocel_object_types_allowed_activities(...)

Filters an object-centric event log, keeping only the specified object types with the specified set of allowed activities.

filter_ocel_objects(ocel, object_identifiers)

Filters the object identifiers of an object-centric event log.

filter_ocel_start_events_per_object_type(...)

Filters the events in which a new object of the given object type is spawned.

filter_paths_performance(log, path, ...[, ...])

Filters the event log based on the performance of specified paths.

filter_prefixes(log, activity[, strict, ...])

Filters the log, keeping the prefixes leading up to a given activity.

filter_start_activities(log, activities[, ...])

Filters cases that have a start activity in the provided list.

filter_suffixes(log, activity[, strict, ...])

Filters the log, keeping the suffixes starting from a given activity.

filter_time_range(log, dt1, dt2[, mode, ...])

Filters a log based on a time interval.

filter_trace_attribute_values(log, ...[, ...])

Filters a log based on the values of a specified trace attribute.

filter_trace_segments(log, admitted_traces)

Filters an event log based on a set of trace segments.

filter_variants(log, variants[, retain, ...])

Filters a log based on a specified set of variants.

filter_variants_by_coverage_percentage(log, ...)

Filters the variants of the log based on a coverage percentage.

filter_variants_top_k(log, k[, ...])

Keeps the top-k variants of the log.