pm4py.algo.filtering.log.cases package

Submodules

pm4py.algo.filtering.log.cases.case_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.cases.case_filter.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

TIMESTAMP_KEY = 'pm4py:param:timestamp_key'
pm4py.algo.filtering.log.cases.case_filter.apply(df, parameters=None)[source]
pm4py.algo.filtering.log.cases.case_filter.apply_auto_filter(df, parameters=None)[source]
pm4py.algo.filtering.log.cases.case_filter.filter_case_performance(log, inf_perf, sup_perf, parameters=None)[source]
pm4py.algo.filtering.log.cases.case_filter.filter_on_case_performance(log: pm4py.objects.log.obj.EventLog, inf_perf: float, sup_perf: float, parameters: Optional[Dict[Union[str, pm4py.algo.filtering.log.cases.case_filter.Parameters], Any]] = None) pm4py.objects.log.obj.EventLog[source]

Gets a filtered log keeping only traces that satisfy the given performance requirements

Parameters
  • log – Log

  • inf_perf – Lower bound on the performance

  • sup_perf – Upper bound on the performance

  • parameters – Parameters

Returns

Filtered log

Return type

filtered_log

pm4py.algo.filtering.log.cases.case_filter.filter_on_case_size(log: pm4py.objects.log.obj.EventLog, min_case_size: int = 2, max_case_size=None) pm4py.objects.log.obj.EventLog[source]

Get only traces in the log with a given size

Parameters
  • log – Log

  • min_case_size – Minimum desidered size of traces

  • max_case_size – Maximum desidered size of traces

Returns

Filtered log

Return type

filtered_log

pm4py.algo.filtering.log.cases.case_filter.filter_on_ncases(log: pm4py.objects.log.obj.EventLog, max_no_cases: int = 1000) pm4py.objects.log.obj.EventLog[source]

Get only a specified number of traces from a log

Parameters
  • log – Log

  • max_no_cases – Desidered number of traces from the log

Returns

Filtered log

Return type

filtered_log

pm4py.algo.filtering.log.cases.case_filter.satisfy_perf(trace: pm4py.objects.log.obj.Trace, inf_perf: float, sup_perf: float, timestamp_key: str) bool[source]

Checks if the trace satisfy the performance requirements

Parameters
  • trace – Trace

  • inf_perf – Lower bound on the performance

  • sup_perf – Upper bound on the performance

  • timestamp_key – Timestamp key

Returns

Boolean (is True if the trace satisfy the given performance requirements)

Return type

boolean

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