pm4py.algo.filtering.pandas.ltl package

Submodules

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

pm4py.algo.filtering.pandas.ltl.ltl_checker.A_eventually_B(df0, A, B, parameters=None)[source]

Applies the A eventually B rule

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, returns all the cases containing A and B and in which A was eventually followed by B - If False, returns all the cases not containing A or B, or in which an instance of A was not eventually followed by an instance of B

Returns

Filtered dataframe

Return type

filtered_df

pm4py.algo.filtering.pandas.ltl.ltl_checker.A_eventually_B_eventually_C(df0, A, B, C, parameters=None)[source]

Applies the A eventually B eventually 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 eventually followed by B and B was eventually followed by C - If False, returns all the cases not containing A or B or C, or in which an instance of A was not eventually followed by an instance of B or an instance of B was not eventually followed by C

Returns

Filtered dataframe

Return type

filtered_df

pm4py.algo.filtering.pandas.ltl.ltl_checker.A_eventually_B_eventually_C_eventually_D(df0, A, B, C, D, parameters=None)[source]

Applies the A eventually B eventually C rule

Parameters
  • df0 – Dataframe

  • A – A Attribute value

  • B – B Attribute value

  • C – C Attribute value

  • D – D Attribute value

  • parameters – Parameters of the algorithm, including the attribute key and the positive parameter: - If True, returns all the cases containing A, B, C and D and in which A was eventually followed by B

    and B was eventually followed by C and C was eventually followed by D

    • If False, returns all the cases not containing A or B or C or D, or in which an instance of A was not eventually

      followed by an instance of B or an instance of B was not eventually followed by C or an instance of C was not eventually followed by D

Returns

Filtered dataframe

Return type

filtered_df

pm4py.algo.filtering.pandas.ltl.ltl_checker.A_next_B_next_C(df0, A, B, C, parameters=None)[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 dataframe

Return type

filtered_df

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

Bases: enum.Enum

An enumeration.

ATTRIBUTE_KEY = 'pm4py:param:attribute_key'
CASE_ID_KEY = 'case_id_glue'
ENABLE_TIMESTAMP = 'enable_timestamp'
POSITIVE = 'positive'
RESOURCE_KEY = 'pm4py:param:resource_key'
TIMESTAMP_DIFF_BOUNDARIES = 'timestamp_diff_boundaries'
TIMESTAMP_KEY = 'pm4py:param:timestamp_key'
pm4py.algo.filtering.pandas.ltl.ltl_checker.attr_value_different_persons(df0, A, parameters=None)[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 dataframe

Return type

filtered_df

pm4py.algo.filtering.pandas.ltl.ltl_checker.eventually_follows(df0, attribute_values, parameters=None)[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 dataframe

Return type

filtered_df

pm4py.algo.filtering.pandas.ltl.ltl_checker.four_eyes_principle(df0, A, B, parameters=None)[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 dataframe

Return type

filtered_df

Module contents