pm4py.algo.filtering.pandas.variants package

Submodules

pm4py.algo.filtering.pandas.variants.variants_filter module

class pm4py.algo.filtering.pandas.variants.variants_filter.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
CASE_ID_KEY = 'case_id_glue'
DECREASING_FACTOR = 'decreasingFactor'
POSITIVE = 'positive'
pm4py.algo.filtering.pandas.variants.variants_filter.apply(df, admitted_variants, parameters=None)[source]

Apply a filter on variants

Parameters
  • df – Dataframe

  • admitted_variants – List of admitted variants (to include/exclude)

  • parameters

    Parameters of the algorithm, including:

    Parameters.CASE_ID_KEY -> Column that contains the Case ID Parameters.ACTIVITY_KEY -> Column that contains the activity Parameters.POSITIVE -> Specifies if the filter should be applied including traces (positive=True) or excluding traces (positive=False) variants_df -> If provided, avoid recalculation of the variants dataframe

Returns

Filtered dataframe

Return type

df

pm4py.algo.filtering.pandas.variants.variants_filter.apply_auto_filter(df, parameters=None)[source]

Apply an automatic filter on variants

Parameters
  • df – Dataframe

  • parameters

    Parameters of the algorithm, including:

    Parameters.CASE_ID_KEY -> Column that contains the Case ID Parameters.ACTIVITY_KEY -> Column that contains the activity variants_df -> If provided, avoid recalculation of the variants dataframe Parameters.DECREASING_FACTOR -> Decreasing factor that should be passed to the algorithm

Returns

Filtered dataframe

Return type

df

Module contents