pm4py.algo.evaluation.replay_fitness.algorithm module#

PM4Py – A Process Mining Library for Python

Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program 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 Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.

Website: https://processintelligence.solutions Contact: info@processintelligence.solutions

class pm4py.algo.evaluation.replay_fitness.algorithm.Variants(*values)[source]#

Bases: Enum

ALIGNMENT_BASED = <module 'pm4py.algo.evaluation.replay_fitness.variants.alignment_based' from '/home/berti/pm4py/pm4py/algo/evaluation/replay_fitness/variants/alignment_based.py'>#
TOKEN_BASED = <module 'pm4py.algo.evaluation.replay_fitness.variants.token_replay' from '/home/berti/pm4py/pm4py/algo/evaluation/replay_fitness/variants/token_replay.py'>#
class pm4py.algo.evaluation.replay_fitness.algorithm.Parameters(*values)[source]#

Bases: Enum

ALIGN_VARIANT = 'align_variant'#
pm4py.algo.evaluation.replay_fitness.algorithm.apply(log: EventLog | DataFrame, petri_net: PetriNet, initial_marking: Marking, final_marking: Marking, parameters: Dict[str | Parameters, Any] | None = None, variant=None, align_variant=None) Dict[str, Any][source]#

Apply fitness evaluation starting from an event log and a marked Petri net, by using one of the replay techniques provided by PM4Py

Parameters:
  • log – Trace log object

  • petri_net – Petri net

  • initial_marking – Initial marking

  • final_marking – Final marking

  • parameters – Parameters related to the replay algorithm

  • variant

    Chosen variant:
    • Variants.ALIGNMENT_BASED

    • Variants.TOKEN_BASED

  • align_variant – Alignments variant (for alignment-based replay)

Returns:

Fitness evaluation

Return type:

fitness_eval

pm4py.algo.evaluation.replay_fitness.algorithm.evaluate(results, parameters=None, variant=Variants.TOKEN_BASED)[source]#

Evaluate replay results when the replay algorithm has already been applied

Parameters:
  • results – Results of the replay algorithm

  • parameters – Possible parameters passed to the evaluation

  • variant – Indicates which evaluator is called

Returns:

Fitness evaluation

Return type:

fitness_eval