pm4py.algo.filtering.pandas.auto_filter package

Submodules

pm4py.algo.filtering.pandas.auto_filter.auto_filter 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.auto_filter.auto_filter.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
ATTRIBUTE_KEY = 'pm4py:param:attribute_key'
CASE_ID_KEY = 'pm4py:param:case_id_key'
DECREASING_FACTOR = 'decreasingFactor'
ENABLE_ACTIVITES_FILTER = 'enable_activities_filter'
ENABLE_END_ACTIVITIES_FILTER = 'enable_end_activities_filter'
ENABLE_START_ACTIVITIES_FILTER = 'enable_start_activities_filter'
ENABLE_VARIANTS_FILTER = 'enable_variants_filter'
POSITIVE = 'positive'
RETURN_EA_COUNT = 'return_ea_count_dict_autofilter'
pm4py.algo.filtering.pandas.auto_filter.auto_filter.apply_auto_filter(df, parameters=None)[source]

Apply some filters to Pandas dataframe in order to get a simpler dataframe

Parameters
  • df – Dataframe

  • parameters

    Eventual parameters passed to the algorithms:

    Parameters.CASE_ID_KEY -> Column where the case ID is present Parameters.ACTIVITY_KEY -> Column where the activity is present Parameters.DECREASING_FACTOR -> Decreasing factor (provided to all algorithms) Parameters.ENABLE_ACTIVITES_FILTER -> Enables or disables auto filter on activities number (it is useful to disable if the dataframe has been already filtered by activities number before). Default is True Parameters.ENABLE_VARIANTS_FILTER -> Enables or disables auto filter on variants (that is slower than others). Default is False Parameters.ENABLE_START_ACTIVITIES_FILTER -> Enables or disables auto filter on start activities. Default is False Parameters.ENABLE_END_ACTIVITIES_FILTER -> Enables or disables auto filter on end activities. Default is True

Returns

Filtered dataframe

Return type

df

Deprecated since version 2.2.11: This will be removed in 3.0.0. Removed

Module contents

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/>.