pm4py.evaluation.replay_fitness.variants package¶
Submodules¶
pm4py.evaluation.replay_fitness.variants.alignment_based 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/>.
-
pm4py.evaluation.replay_fitness.variants.alignment_based.apply(log, petri_net, initial_marking, final_marking, align_variant=<Variants.VERSION_STATE_EQUATION_A_STAR: <module 'pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star' from '/home/docs/checkouts/readthedocs.org/user_builds/pm4py-source/checkouts/stable/pm4py/algo/conformance/alignments/petri_net/variants/state_equation_a_star.py'>>, parameters=None)[source]¶ Evaluate fitness based on alignments
Parameters: - log – Event log
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- align_variant – Variants of the alignments to apply
- parameters – Parameters of the algorithm
Returns: Containing two keys (percFitTraces and averageFitness)
Return type: dictionary
-
pm4py.evaluation.replay_fitness.variants.alignment_based.apply_trace(trace, petri_net, initial_marking, final_marking, best_worst, activity_key)[source]¶ Performs the basic alignment search, given a trace, a net and the costs of the “best of the worst”. The costs of the best of the worst allows us to deduce the fitness of the trace. We compute the fitness by means of 1 - alignment costs / best of worst costs (i.e. costs of 0 => fitness 1)
Parameters: - trace (
listinput trace, assumed to be a list of events (i.e. the code will use the activity key to) - get the attributes)
- petri_net (
pm4py.objects.petri.net.PetriNetthe Petri net to use in the alignment) - initial_marking (
pm4py.objects.petri.net.Markinginitial marking in the Petri net) - final_marking (
pm4py.objects.petri.net.Markingfinal marking in the Petri net) - best_worst (cost of the best worst alignment of a trace (empty trace aligned to the model))
- activity_key (
str(optional) key to use to identify the activity described by the events)
Returns: dictionary
Return type: dict with keys alignment, cost, visited_states, queued_states and traversed_arcs
- trace (
-
pm4py.evaluation.replay_fitness.variants.alignment_based.evaluate(aligned_traces, parameters=None)[source]¶ Transforms the alignment result to a simple dictionary including the percentage of fit traces and the average fitness
Parameters: - aligned_traces – Alignments calculated for the traces in the log
- parameters – Possible parameters of the evaluation
Returns: Containing two keys (percFitTraces and averageFitness)
Return type: dictionary
pm4py.evaluation.replay_fitness.variants.token_replay 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/>.
-
pm4py.evaluation.replay_fitness.variants.token_replay.apply(log, petri_net, initial_marking, final_marking, parameters=None)[source]¶ Apply token replay fitness evaluation
Parameters: - log – Trace log
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters
Returns: Containing two keys (percFitTraces and averageFitness)
Return type: dictionary
-
pm4py.evaluation.replay_fitness.variants.token_replay.evaluate(aligned_traces, parameters=None)[source]¶ Gets a dictionary expressing fitness in a synthetic way from the list of boolean values saying if a trace in the log is fit, and the float values of fitness associated to each trace
Parameters: - aligned_traces – Result of the token-based replayer
- parameters – Possible parameters of the evaluation
Returns: Containing two keys (percFitTraces and averageFitness)
Return type: dictionary
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/>.