pm4py.algo.filtering.polars.ltl.ltl_checker module#
PM4Py – A Process Mining Library for Python Copyright (C) 2026 Process Intelligence Solutions GmbH
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions Contact: info@processintelligence.solutions
- class pm4py.algo.filtering.polars.ltl.ltl_checker.Parameters(*values)[source]#
Bases:
Enum- CASE_ID_KEY = 'pm4py:param:case_id_key'#
- ATTRIBUTE_KEY = 'pm4py:param:attribute_key'#
- TIMESTAMP_KEY = 'pm4py:param:timestamp_key'#
- RESOURCE_KEY = 'pm4py:param:resource_key'#
- POSITIVE = 'positive'#
- ENABLE_TIMESTAMP = 'enable_timestamp'#
- TIMESTAMP_DIFF_BOUNDARIES = 'timestamp_diff_boundaries'#
- pm4py.algo.filtering.polars.ltl.ltl_checker.eventually_follows(df: polars.LazyFrame, attribute_values: List[str], parameters: Dict[str | Parameters, Any] | None = None) polars.LazyFrame[source]#
Applies the eventually follows rule
- Parameters:
df – LazyFrame
attribute_values – A list of attribute_values attribute_values[n] follows attribute_values[n-1] follows … follows attribute_values[0]
parameters – Parameters of the algorithm, including the attribute key and the positive parameter: - If True, returns all the cases containing all attribute_values and in which attribute_values[i] was eventually followed by attribute_values[i + 1] - If False, returns all the cases not containing all attribute_values, or in which an instance of attribute_values[i] was not eventually followed by an instance of attribute_values[i + 1]
- Returns:
Filtered LazyFrame
- Return type:
filtered_df
- pm4py.algo.filtering.polars.ltl.ltl_checker.A_next_B_next_C(df: polars.LazyFrame, attribute_values: List[str], parameters: Dict[str | Parameters, Any] | None = None) polars.LazyFrame[source]#
Applies the A next B next C rule
- Parameters:
df – LazyFrame
attribute_values – A list of attribute_values attribute_values[n] follows attribute_values[n-1] follows … follows attribute_values[0]
parameters – Parameters of the algorithm, including the attribute key and the positive parameter: - If True, returns all the cases containing all attribute_values and in which attribute_values[i] is directly followed by attribute_values[i + 1] - If False, returns all the cases not containing all attribute_values, or in which an instance of attribute_values[i] is not directly followed by an instance of attribute_values[i + 1]
- Returns:
Filtered LazyFrame
- Return type:
filtered_df
- pm4py.algo.filtering.polars.ltl.ltl_checker.four_eyes_principle(df: polars.LazyFrame, attribute_values: List[str], parameters: Dict[str | Parameters, Any] | None = None) polars.LazyFrame[source]#
Verifies the Four Eyes Principle given a set of activities
- Parameters:
df – LazyFrame
attribute_values – List of activities to verify
parameters – Parameters of the algorithm, including the attribute key and the positive parameter: - if True, then filters all the cases where the resource executing each activity is DIFFERENT from the others - if False, then filters all the cases where at least one pair of activities is executed by the SAME resource
- Returns:
Filtered LazyFrame
- Return type:
filtered_df
- pm4py.algo.filtering.polars.ltl.ltl_checker.attr_value_different_persons(df: polars.LazyFrame, attribute_value: str, parameters: Dict[str | Parameters, Any] | None = None) polars.LazyFrame[source]#
Checks whether an attribute value is performed by different persons
- Parameters:
df – LazyFrame
attribute_value – Attribute value to check
parameters –
- Parameters of the algorithm, including the attribute key and the positive parameter:
if True, then filters all the cases where the attribute value is performed by different resources
if False, then filters all the cases where the attribute value is performed only by a single resource
- Returns:
Filtered LazyFrame
- Return type:
filtered_df