pm4py.algo.filtering.log.end_activities package

Submodules

pm4py.algo.filtering.log.end_activities.end_activities_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.log.end_activities.end_activities_filter.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
DECREASING_FACTOR = 'decreasingFactor'
POSITIVE = 'positive'
pm4py.algo.filtering.log.end_activities.end_activities_filter.apply(log: pm4py.objects.log.obj.EventLog, admitted_end_activities: List[str], parameters: Optional[Dict[Union[str, pm4py.algo.filtering.log.end_activities.end_activities_filter.Parameters], Any]] = None) pm4py.objects.log.obj.EventLog[source]

Filter the log on the specified end activities

Parameters
  • log – Log

  • admitted_end_activities – Admitted end activities

  • parameters – Algorithm parameters

Returns

Filtered log

Return type

filtered_log

pm4py.algo.filtering.log.end_activities.end_activities_filter.apply_auto_filter(log, variants=None, parameters=None)[source]

Apply an end attributes filter detecting automatically a percentage

Parameters
  • log – Log

  • variants – (If specified) Dictionary with variant as the key and the list of traces as the value

  • parameters

    Parameters of the algorithm, including:

    Parameters.DECREASING_FACTOR -> Decreasing factor (stops the algorithm when the next activity by occurrence is below this factor in comparison to previous) Parameters.ACTIVITY_KEY -> Attribute key (must be specified if different from concept:name)

Returns

Filtered log

Return type

filtered_log

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

pm4py.algo.filtering.log.end_activities.end_activities_filter.filter_log_by_end_activities(end_activities, variants, vc, threshold, activity_key='concept:name')[source]

Keep only variants of the log with an end activity which number of occurrences is above the threshold

Parameters
  • end_activities – Dictionary of end attributes associated with their count

  • variants – (If specified) Dictionary with variant as the key and the list of traces as the value

  • vc – List of variant names along with their count

  • threshold – Cutting threshold (remove variants having end attributes which number of occurrences is below the threshold

  • activity_key – (If specified) Specify the activity key in the log (default concept:name)

Returns

Filtered log

Return type

filtered_log

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