pm4py.algo.simulation.tree_generator.variants package¶
Submodules¶
pm4py.algo.simulation.tree_generator.variants.basic 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.simulation.tree_generator.variants.basic.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
MAX_REC_DEPTH= 'max_rec_depth'¶
-
MIN_REC_DEPTH= 'min_rec_depth'¶
-
PROB_LEAF= 'prob_leaf'¶
-
REC_DEPTH= 'rec_depth'¶
-
-
pm4py.algo.simulation.tree_generator.variants.basic.apply(parameters: Optional[Dict[Union[str, pm4py.algo.simulation.tree_generator.variants.basic.Parameters], Any]] = None) → pm4py.objects.process_tree.obj.ProcessTree[source]¶ Generate a process tree
Parameters: parameters –
- Paramters of the algorithm, including:
Parameters.REC_DEPTH -> current recursion depth Parameters.MIN_REC_DEPTH -> minimum recursion depth Parameters.MAX_REC_DEPTH -> maximum recursion depth Parameters.PROB_LEAF -> Probability to get a leaf
Returns: Process tree
Return type: tree
pm4py.algo.simulation.tree_generator.variants.ptandloggenerator 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.simulation.tree_generator.variants.ptandloggenerator.GeneratedTree(parameters)[source]¶ Bases:
object-
add_duplicates()[source]¶ Replaces some leaves to add duplicated labels. Depends on parameter. :return:
-
alphabet= 'abcdefghijklmnopqrstuvwxyz'¶
-
calculate_activity_distribution(mode, min, max)[source]¶ Here, the triangular function is used, since the parameters for this function are given in the paramterfile. However, this approach can be applied on other distribution functions as well. :param mode: Mode of the distribution :param min: Smallest number :param max: Highest number :return: Distribution object
-
-
class
pm4py.algo.simulation.tree_generator.variants.ptandloggenerator.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
CHOICE= 'choice'¶
-
DUPLICATE= 'duplicate'¶
-
LOOP= 'loop'¶
-
MAX= 'max'¶
-
MIN= 'min'¶
-
MODE= 'mode'¶
-
NO_MODELS= 'no_models'¶
-
OR= 'or'¶
-
PARALLEL= 'parallel'¶
-
SEQUENCE= 'sequence'¶
-
SILENT= 'silent'¶
-
-
pm4py.algo.simulation.tree_generator.variants.ptandloggenerator.apply(parameters: Optional[Dict[Union[str, pm4py.algo.simulation.tree_generator.variants.ptandloggenerator.Parameters], Any]] = None) → pm4py.objects.process_tree.obj.ProcessTree[source]¶ Generate a process tree using the PTAndLogGenerator approach (see the paper PTandLogGenerator: A Generator for Artificial Event Data)
Parameters: parameters – Parameters of the algorithm, according to the paper: - Parameters.MODE: most frequent number of visible activities - Parameters.MIN: minimum number of visible activities - Parameters.MAX: maximum number of visible activities - Parameters.SEQUENCE: probability to add a sequence operator to tree - Parameters.CHOICE: probability to add a choice operator to tree - Parameters.PARALLEL: probability to add a parallel operator to tree - Parameters.LOOP: probability to add a loop operator to tree - Parameters.OR: probability to add an or operator to tree - Parameters.SILENT: probability to add silent activity to a choice or loop operator - Parameters.DUPLICATE: probability to duplicate an activity label - Parameters.NO_MODELS: number of trees to generate from model population
-
pm4py.algo.simulation.tree_generator.variants.ptandloggenerator.choices(population, weights=None, *, cum_weights=None, k=1)[source]¶ Return a k sized list of population elements chosen with replacement. If the relative weights or cumulative weights are not specified, the selections are made with equal probability.
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/>.