pm4py.filtering.filter_four_eyes_principle#
- pm4py.filtering.filter_four_eyes_principle(log: EventLog | DataFrame, activity1: str, activity2: str, activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name', resource_key: str = 'org:resource', keep_violations: bool = False) EventLog | DataFrame [source]#
Filters out the cases of the log that violate the four-eyes principle on the provided activities.
- Parameters:
log – Event log or Pandas DataFrame.
activity1 (
str
) – First activity.activity2 (
str
) – Second activity.activity_key (
str
) – Attribute to be used for the activity.timestamp_key (
str
) – Attribute to be used for the timestamp.case_id_key (
str
) – Attribute to be used as case identifier.resource_key (
str
) – Attribute to be used as resource.keep_violations (
bool
) – Boolean indicating whether to discard (if False) or retain (if True) the violations.
- Returns:
Filtered event log or Pandas DataFrame.
import pm4py filtered_dataframe = pm4py.filter_four_eyes_principle( dataframe, 'Act. A', 'Act. B', activity_key='concept:name', resource_key='org:resource', timestamp_key='time:timestamp', case_id_key='case:concept:name' )