pm4py.algo.conformance.alignments.petri_net package¶
Subpackages¶
- pm4py.algo.conformance.alignments.petri_net.utils package
- pm4py.algo.conformance.alignments.petri_net.variants package
- Submodules
- pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory module
- pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics module
- pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star module
- pm4py.algo.conformance.alignments.petri_net.variants.state_equation_a_star module
- pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star module
- Module contents
Submodules¶
pm4py.algo.conformance.alignments.petri_net.algorithm 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.conformance.alignments.petri_net.algorithm.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
ACTIVITY_KEY= 'pm4py:param:activity_key'¶
-
BEST_WORST_COST_INTERNAL= 'best_worst_cost_internal'¶
-
CASE_ID_KEY= 'pm4py:param:case_id_key'¶
-
CORES= 'cores'¶
-
EXPONENT= 'theta'¶
-
FITNESS_ROUND_DIGITS= 'fitness_round_digits'¶
-
PARAMETER_VARIANT_DELIMITER= 'variant_delimiter'¶
-
PARAM_ALIGNMENT_RESULT_IS_SYNC_PROD_AWARE= 'ret_tuple_as_trans_desc'¶
-
PARAM_MAX_ALIGN_TIME= 'max_align_time'¶
-
PARAM_MAX_ALIGN_TIME_TRACE= 'max_align_time_trace'¶
-
PARAM_MODEL_COST_FUNCTION= 'model_cost_function'¶
-
PARAM_SYNC_COST_FUNCTION= 'sync_cost_function'¶
-
PARAM_TRACE_COST_FUNCTION= 'trace_cost_function'¶
-
PARAM_TRACE_NET_COSTS= 'trace_net_costs'¶
-
SHOW_PROGRESS_BAR= 'show_progress_bar'¶
-
SYNCHRONOUS= 'synchronous_dijkstra'¶
-
TRACE_NET_CONSTR_FUNCTION= 'trace_net_constr_function'¶
-
TRACE_NET_COST_AWARE_CONSTR_FUNCTION= 'trace_net_cost_aware_constr_function'¶
-
VARIANTS_IDX= 'variants_idx'¶
-
-
class
pm4py.algo.conformance.alignments.petri_net.algorithm.Variants[source]¶ Bases:
enum.EnumAn enumeration.
-
VERSION_DIJKSTRA_LESS_MEMORY= <module 'pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_less_memory' from '/home/docs/checkouts/readthedocs.org/user_builds/pm4py-source/checkouts/latest/pm4py/algo/conformance/alignments/petri_net/variants/dijkstra_less_memory.py'>¶
-
VERSION_DIJKSTRA_NO_HEURISTICS= <module 'pm4py.algo.conformance.alignments.petri_net.variants.dijkstra_no_heuristics' from '/home/docs/checkouts/readthedocs.org/user_builds/pm4py-source/checkouts/latest/pm4py/algo/conformance/alignments/petri_net/variants/dijkstra_no_heuristics.py'>¶
-
VERSION_DISCOUNTED_A_STAR= <module 'pm4py.algo.conformance.alignments.petri_net.variants.discounted_a_star' from '/home/docs/checkouts/readthedocs.org/user_builds/pm4py-source/checkouts/latest/pm4py/algo/conformance/alignments/petri_net/variants/discounted_a_star.py'>¶
-
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/latest/pm4py/algo/conformance/alignments/petri_net/variants/state_equation_a_star.py'>¶
-
VERSION_TWEAKED_STATE_EQUATION_A_STAR= <module 'pm4py.algo.conformance.alignments.petri_net.variants.tweaked_state_equation_a_star' from '/home/docs/checkouts/readthedocs.org/user_builds/pm4py-source/checkouts/latest/pm4py/algo/conformance/alignments/petri_net/variants/tweaked_state_equation_a_star.py'>¶
-
-
pm4py.algo.conformance.alignments.petri_net.algorithm.apply(obj: Union[pm4py.objects.log.obj.EventLog, pm4py.objects.log.obj.EventStream, pandas.core.frame.DataFrame, pm4py.objects.log.obj.Trace], petri_net: pm4py.objects.petri_net.obj.PetriNet, initial_marking: pm4py.objects.petri_net.obj.Marking, final_marking: pm4py.objects.petri_net.obj.Marking, parameters: Optional[Dict[Any, Any]] = None, 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/latest/pm4py/algo/conformance/alignments/petri_net/variants/state_equation_a_star.py'>>) → Union[Dict[str, Any], List[Dict[str, Any]]][source]¶
-
pm4py.algo.conformance.alignments.petri_net.algorithm.apply_log(log, petri_net, initial_marking, final_marking, parameters=None, 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/latest/pm4py/algo/conformance/alignments/petri_net/variants/state_equation_a_star.py'>>)[source]¶ apply alignments to a log :Parameters: * log – object of the form
pm4py.log.log.EventLogevent log- petri_net –
pm4py.objects.petri.petrinet.PetriNetthe model to use for the alignment - initial_marking –
pm4py.objects.petri.petrinet.Markinginitial marking of the net - final_marking –
pm4py.objects.petri.petrinet.Markingfinal marking of the net - variant – selected variant of the algorithm, possible values: {‘Variants.VERSION_STATE_EQUATION_A_STAR, Variants.VERSION_DIJKSTRA_NO_HEURISTICS ‘}
- parameters –
dictparameters of the algorithm,
Returns: listofdictwith keys alignment, cost, visited_states, queued_states and traversed_arcs The alignment is a sequence of labels of the form (a,t), (a,>>), or (>>,t) representing synchronous/log/model-moves.Return type: alignment - petri_net –
-
pm4py.algo.conformance.alignments.petri_net.algorithm.apply_multiprocessing(log, petri_net, initial_marking, final_marking, parameters=None, 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/latest/pm4py/algo/conformance/alignments/petri_net/variants/state_equation_a_star.py'>>)[source]¶ Applies the alignments using a process pool (multiprocessing)
Parameters: - log – Event log
- petri_net – Petri net
- initial_marking – Initial marking
- final_marking – Final marking
- parameters – Parameters of the algorithm
Returns: Alignments
Return type: aligned_traces
-
pm4py.algo.conformance.alignments.petri_net.algorithm.apply_trace(trace, petri_net, initial_marking, final_marking, parameters=None, 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/latest/pm4py/algo/conformance/alignments/petri_net/variants/state_equation_a_star.py'>>)[source]¶ apply alignments to a trace :Parameters: * trace –
pm4py.log.log.Tracetrace of eventspetri_net –
pm4py.objects.petri.petrinet.PetriNetthe model to use for the alignmentinitial_marking –
pm4py.objects.petri.petrinet.Markinginitial marking of the netfinal_marking –
pm4py.objects.petri.petrinet.Markingfinal marking of the netvariant – selected variant of the algorithm, possible values: {‘Variants.VERSION_STATE_EQUATION_A_STAR, Variants.VERSION_DIJKSTRA_NO_HEURISTICS ‘}
parameters –
dictparameters of the algorithm, for key ‘state_equation_a_star’:Parameters.ACTIVITY_KEY -> Attribute in the log that contains the activity Parameters.PARAM_MODEL_COST_FUNCTION -> mapping of each transition in the model to corresponding synchronous costs Parameters.PARAM_SYNC_COST_FUNCTION -> mapping of each transition in the model to corresponding model cost Parameters.PARAM_TRACE_COST_FUNCTION -> mapping of each index of the trace to a positive cost value
Returns: dictwith keys alignment, cost, visited_states, queued_states and traversed_arcs The alignment is a sequence of labels of the form (a,t), (a,>>), or (>>,t) representing synchronous/log/model-moves.Return type: alignment
-
pm4py.algo.conformance.alignments.petri_net.algorithm.get_diagnostics_dataframe(log, align_output, parameters=None)[source]¶ Gets the diagnostics results of alignments (of a log) in a dataframe
Parameters: - log – Event log
- align_output – Output of the alignments
Returns: Diagnostics dataframe
Return type: dataframe
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/>.