pm4py.algo.filtering.pandas.ltl package#

This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).

PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PM4Py 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.

Submodules#

pm4py.algo.filtering.pandas.ltl.ltl_checker module#

This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).

PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PM4Py 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.

class pm4py.algo.filtering.pandas.ltl.ltl_checker.Parameters(value)[source]#

Bases: Enum

An enumeration.

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.pandas.ltl.ltl_checker.eventually_follows(df0: DataFrame, attribute_values: List[str], parameters: Optional[Dict[Union[str, Parameters], Any]] = None) DataFrame[source]#

Applies the eventually follows rule

Parameters#

df0

Dataframe

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_df

Filtered dataframe

pm4py.algo.filtering.pandas.ltl.ltl_checker.A_next_B_next_C(df0: DataFrame, A: str, B: str, C: str, parameters: Optional[Dict[Union[str, Parameters], Any]] = None) DataFrame[source]#

Applies the A net B next C rule

Parameters#

df0

Dataframe

A

A Attribute value

B

B Attribute value

C

C Attribute value

parameters

Parameters of the algorithm, including the attribute key and the positive parameter: - If True, returns all the cases containing A, B and C and in which A was directly followed by B and B was directly followed by C - If False, returns all the cases not containing A or B or C, or in which none instance of A was directly followed by an instance of B and B was directly followed by C

Returns#

filtered_df

Filtered dataframe

pm4py.algo.filtering.pandas.ltl.ltl_checker.four_eyes_principle(df0: DataFrame, A: str, B: str, parameters: Optional[Dict[Union[str, Parameters], Any]] = None) DataFrame[source]#

Verifies the Four Eyes Principle given A and B

Parameters#

df0

Dataframe

A

A attribute value

B

B attribute value

parameters

Parameters of the algorithm, including the attribute key and the positive parameter: - if True, then filters all the cases containing A and B which have empty intersection between the set

of resources doing A and B

  • if False, then filters all the cases containing A and B which have no empty intersection between the set of resources doing A and B

Returns#

filtered_df

Filtered dataframe

pm4py.algo.filtering.pandas.ltl.ltl_checker.attr_value_different_persons(df0: DataFrame, A: str, parameters: Optional[Dict[Union[str, Parameters], Any]] = None) DataFrame[source]#

Checks whether an attribute value is assumed on events done by different resources

Parameters#

df0

Dataframe

A

A attribute value

parameters
Parameters of the algorithm, including the attribute key and the positive parameter:
  • if True, then filters all the cases containing occurrences of A done by different resources

  • if False, then filters all the cases not containing occurrences of A done by different resources

Returns#

filtered_df

Filtered dataframe