pm4py.algo.conformance.alignments.dfg.variants package¶
Submodules¶
pm4py.algo.conformance.alignments.dfg.variants.classic 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.dfg.variants.classic.Outputs[source]¶ Bases:
enum.EnumAn enumeration.
-
ALIGNMENT= 'alignment'¶
-
CLOSED= 'closed'¶
-
COST= 'cost'¶
-
INTERNAL_COST= 'internal_cost'¶
-
VISITED= 'visited_states'¶
-
-
class
pm4py.algo.conformance.alignments.dfg.variants.classic.Parameters[source]¶ Bases:
enum.EnumAn enumeration.
-
ACTIVITY_KEY= 'pm4py:param:activity_key'¶
-
INTERNAL_LOG_MOVE_COST_FUNCTION= 'internal_log_move_cost_function'¶
-
LOG_MOVE_COST_FUNCTION= 'log_move_cost_function'¶
-
MODEL_MOVE_COST_FUNCTION= 'model_move_cost_function'¶
-
PARAMETER_VARIANT_DELIMITER= 'variant_delimiter'¶
-
SYNC_COST_FUNCTION= 'sync_cost_function'¶
-
-
pm4py.algo.conformance.alignments.dfg.variants.classic.apply(obj: Union[pm4py.objects.log.obj.EventLog, pm4py.objects.log.obj.Trace], dfg: Dict[Tuple[str, str], int], sa: Dict[str, int], ea: Dict[str, int], parameters: Optional[Dict[Union[str, pm4py.algo.conformance.alignments.dfg.variants.classic.Parameters], Any]] = None) → Union[Dict[str, Any], List[Dict[str, Any]]][source]¶ Applies the alignment algorithm provided a log/trace object, and a connected DFG
Parameters: - obj – Event log / Trace
- dfg – Connected directly-Follows Graph
- sa – Start activities
- ea – End activities
- parameters – Parameters of the algorithm: - Parameters.SYNC_COST_FUNCTION: for each activity that is in both the trace and the model, provide the non-negative cost of a sync move - Parameters.MODEL_MOVE_COST_FUNCTION: for each activity that is in the model, provide the non-negative cost of a model move - Parameters.LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is returned in the alignment to the user (but not used internally for ordering the states) - Parameters.INTERNAL_LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is used internally for ordering the states in the search algorithm. - Parameters.ACTIVITY_KEY: the attribute of the log that is the activity
Returns: Result of the alignment
Return type: ali
-
pm4py.algo.conformance.alignments.dfg.variants.classic.apply_from_variant(variant, dfg, sa, ea, parameters=None)[source]¶
-
pm4py.algo.conformance.alignments.dfg.variants.classic.apply_from_variants_list(var_list, dfg, sa, ea, parameters=None)[source]¶
-
pm4py.algo.conformance.alignments.dfg.variants.classic.apply_from_variants_list_dfg_string(var_list, dfg_serialization, parameters=None)[source]¶
-
pm4py.algo.conformance.alignments.dfg.variants.classic.apply_log(log, dfg, sa, ea, parameters=None)[source]¶ Applies the alignment algorithm provided a log object, and a connected DFG
Parameters: - log – Event log
- dfg – Connected DFG
- sa – Start activities
- ea – End activities
- parameters – Parameters of the algorithm: - Parameters.SYNC_COST_FUNCTION: for each activity that is in both the trace and the model, provide the non-negative cost of a sync move - Parameters.MODEL_MOVE_COST_FUNCTION: for each activity that is in the model, provide the non-negative cost of a model move - Parameters.LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is returned in the alignment to the user (but not used internally for ordering the states) - Parameters.INTERNAL_LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is used internally for ordering the states in the search algorithm. - Parameters.ACTIVITY_KEY: the attribute of the log that is the activity
Returns: For each trace, contains a dictionary describing the alignment
Return type: aligned_traces
-
pm4py.algo.conformance.alignments.dfg.variants.classic.apply_trace(trace, dfg, sa, ea, parameters=None)[source]¶ Applies the alignment algorithm provided a trace of a log, and a connected DFG
Parameters: - trace – Trace
- dfg – Connected DFG
- sa – Start activities
- ea – End activities
- parameters – Parameters of the algorithm: - Parameters.SYNC_COST_FUNCTION: for each activity that is in both the trace and the model, provide the non-negative cost of a sync move - Parameters.MODEL_MOVE_COST_FUNCTION: for each activity that is in the model, provide the non-negative cost of a model move - Parameters.LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is returned in the alignment to the user (but not used internally for ordering the states) - Parameters.INTERNAL_LOG_MOVE_COST_FUNCTION: for each activity that is in the trace, provide the cost of a log move that is used internally for ordering the states in the search algorithm. - Parameters.ACTIVITY_KEY: the attribute of the log that is the activity
Returns: Dictionary describing the alignment
Return type: ali
-
pm4py.algo.conformance.alignments.dfg.variants.classic.dijkstra_to_end_node(dfg, sa, ea, start_node, end_node, activities_model, sync_cost_function, model_move_cost_function)[source]¶ Gets the cost of the minimum path from a node to the end node
Parameters: - dfg – Connected DFG
- sa – Start activities
- ea – End activities
- start_node – Start node of the graph (connected to all the start activities)
- end_node – End node of the graph (connected to all the end activities)
- activities_model – Set of the activities contained in the DFG
- sync_cost_function – Given an activity, provides the cost when the activity is executed in a sync way
- model_move_cost_function – Given an activity, provides the cost when the activity is executed as a move-on-model
Returns: Dictionary associating to each node the cost to the end node
Return type: cost_to_end_node
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/>.