pm4py.evaluation.generalization.variants package
Submodules
pm4py.evaluation.generalization.variants.token_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.generalization.variants.token_based.apply(log, petri_net, initial_marking, final_marking, parameters=None)[source]
Calculates generalization on the provided log and Petri net.
The approach has been suggested by the paper Buijs, Joos CAM, Boudewijn F. van Dongen, and Wil MP van der Aalst. “Quality dimensions in process discovery: The importance of fitness, precision, generalization and simplicity.” International Journal of Cooperative Information Systems 23.01 (2014): 1440001.
A token replay is applied and, for each transition, we can measure the number of occurrences in the replay. The following formula is applied for generalization
sum_{t in transitions} (math.sqrt(1.0/(n_occ_replay(t)))
- 1 - ———————————————————-
# transitions
- Parameters
log – Trace log
petri_net – Petri net
initial_marking – Initial marking
final_marking – Final marking
parameters – Algorithm parameters
- Returns
Generalization measure
- Return type
generalization
- pm4py.evaluation.generalization.variants.token_based.get_generalization(petri_net, aligned_traces)[source]
Gets the generalization from the Petri net and the list of activated transitions during the replay
The approach has been suggested by the paper Buijs, Joos CAM, Boudewijn F. van Dongen, and Wil MP van der Aalst. “Quality dimensions in process discovery: The importance of fitness, precision, generalization and simplicity.” International Journal of Cooperative Information Systems 23.01 (2014): 1440001.
A token replay is applied and, for each transition, we can measure the number of occurrences in the replay. The following formula is applied for generalization
sum_{t in transitions} (math.sqrt(1.0/(n_occ_replay(t)))
- 1 - ———————————————————-
# transitions
- Parameters
petri_net – Petri net
aligned_traces – Result of the token-replay
- Returns
Generalization measure
- Return type
generalization
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/>.