pm4py.algo.conformance.alignments.process_tree.variants package#
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions Contact: info@processintelligence.solutions
Subpackages#
- pm4py.algo.conformance.alignments.process_tree.variants.approximated package
- Submodules
- pm4py.algo.conformance.alignments.process_tree.variants.approximated.calculate_a_sa_ea_sets module
- pm4py.algo.conformance.alignments.process_tree.variants.approximated.matrix_lp module
- pm4py.algo.conformance.alignments.process_tree.variants.approximated.original module
- pm4py.algo.conformance.alignments.process_tree.variants.approximated.utilities module
Submodules#
pm4py.algo.conformance.alignments.process_tree.variants.dynamic_programming module#
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions Contact: info@processintelligence.solutions
- pm4py.algo.conformance.alignments.process_tree.variants.dynamic_programming.clear_global_caches()[source]#
Clear all global caches to free memory
- class pm4py.algo.conformance.alignments.process_tree.variants.dynamic_programming.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum- ACTIVITY_KEY = 'pm4py:param:activity_key'#
- SHOW_PROGRESS_BAR = 'show_progress_bar'#
- MAX_TOTAL_TIME = 'max_total_time'#
- USE_GLOBAL_CACHE = 'use_global_cache'#
- BATCH_SIZE = 'batch_size'#
- CLEAR_GLOBAL_CACHE = 'clear_global_cache'#
- pm4py.algo.conformance.alignments.process_tree.variants.dynamic_programming.align_trace_with_process_tree(trace, tree, use_global_cache=False)[source]#
Aligns a trace with a process tree using dynamic programming. Returns both the cost and the actual alignment.
Version based on: A Dynamic Programming Approach for Alignments on Process Trees http://processquerying.com/wp-content/uploads/2024/09/PQMI_2024_279_A_Dynamic_Programming_Approach_for_Alignments_on_Process_Trees.pdf
Enhanced with global caching and memory optimizations.
- pm4py.algo.conformance.alignments.process_tree.variants.dynamic_programming.apply_list_tuple_activities(list_tuple_activities: List[Collection[str]], process_tree: ProcessTree, parameters: Dict[Any, Any] | None = None) List[Dict[str, Any]][source]#
Apply alignment to a list of trace activity tuples with memory optimization
- pm4py.algo.conformance.alignments.process_tree.variants.dynamic_programming.apply(log: DataFrame | EventLog, process_tree: ProcessTree, parameters: Dict[Any, Any] | None = None) List[Dict[str, Any]][source]#
Optimized version that aligns an event log against a process tree model. Based on the approach described in: Schwanen, Christopher T., Wied Pakusa, and Wil MP van der Aalst. “Process tree alignments.” Enterprise Design, Operations, and Computing, ser. LNCS, Cham: Springer International Publishing (2024).
Parameters#
- log
Event log or Pandas dataframe
- process_tree
Process tree
- parameters
Parameters of the algorithm, including: - Parameters.ACTIVITY_KEY => the attribute to be used as activity - Parameters.SHOW_PROGRESS_BAR => shows the progress bar - Parameters.MAX_TOTAL_TIME => maximum total time in seconds - Parameters.USE_GLOBAL_CACHE => use global caching to reuse results (default: False) - Parameters.BATCH_SIZE => size of batches for processing (default: 1000) - Parameters.CLEAR_GLOBAL_CACHE => clear global cache before processing (default: True)
Returns#
- aligned_traces
List that contains the alignment for each trace
pm4py.algo.conformance.alignments.process_tree.variants.milp module#
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions Contact: info@processintelligence.solutions
- class pm4py.algo.conformance.alignments.process_tree.variants.milp.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum- ACTIVITY_KEY = 'pm4py:param:activity_key'#
- SHOW_PROGRESS_BAR = 'show_progress_bar'#
- class pm4py.algo.conformance.alignments.process_tree.variants.milp.ProcessTreeAligner(tree: ProcessTree)[source]#
Bases:
objectImplementation of the approach described in:
Schwanen, Christopher T., Wied Pakusa, and Wil MP van der Aalst. “Process tree alignments.” Enterprise Design, Operations, and Computing, ser. LNCS, Cham: Springer International Publishing (2024).
- pm4py.algo.conformance.alignments.process_tree.variants.milp.apply_list_tuple_activities(list_tuple_activities: List[Collection[str]], aligner: ProcessTreeAligner, parameters: Dict[Any, Any] | None = None) List[Dict[str, Any]][source]#
Apply the alignment algorithm to a list of activities. Optimized to use caching and more efficient data structures.
- pm4py.algo.conformance.alignments.process_tree.variants.milp.apply(log: DataFrame | EventLog, process_tree: ProcessTree, parameters: Dict[Any, Any] | None = None) List[Dict[str, Any]][source]#
Aligns an event log against a process tree model, using the approach described in: Schwanen, Christopher T., Wied Pakusa, and Wil MP van der Aalst. “Process tree alignments.” Enterprise Design, Operations, and Computing, ser. LNCS, Cham: Springer International Publishing (2024).
Parameters#
- log
Event log or Pandas dataframe
- process_tree
Process tree
- parameters
Parameters of the algorithm, including: - Parameters.ACTIVITY_KEY => the attribute to be used as activity - Parameters.SHOW_PROGRESS_BAR => shows the progress bar
Returns#
- aligned_traces
List that contains the alignment for each trace
pm4py.algo.conformance.alignments.process_tree.variants.search_graph_pt module#
PM4Py – A Process Mining Library for Python
Copyright (C) 2024 Process Intelligence Solutions UG (haftungsbeschränkt)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see this software project’s root or visit <https://www.gnu.org/licenses/>.
Website: https://processintelligence.solutions Contact: info@processintelligence.solutions
- class pm4py.algo.conformance.alignments.process_tree.variants.search_graph_pt.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum- CORES = 'cores'#
- ACTIVITY_KEY = 'pm4py:param:activity_key'#
- SHOW_PROGRESS_BAR = 'show_progress_bar'#
- CASE_ID_KEY = 'pm4py:param:case_id_key'#
- class pm4py.algo.conformance.alignments.process_tree.variants.search_graph_pt.SGASearchState(costs: float, index: int, state: Dict[Tuple[int, ProcessTree], OperatorState], leaves: List[ProcessTree] | None = None, parent: Any = None, children: List[Any] = None)[source]#
Bases:
object
- pm4py.algo.conformance.alignments.process_tree.variants.search_graph_pt.align_variant(variant, tree_leaf_set, pt)[source]#
- pm4py.algo.conformance.alignments.process_tree.variants.search_graph_pt.apply_variant(variant, tree, parameters=None)[source]#
- pm4py.algo.conformance.alignments.process_tree.variants.search_graph_pt.apply_from_variants_list(var_list, tree, parameters=None)[source]#
- pm4py.algo.conformance.alignments.process_tree.variants.search_graph_pt.apply_multiprocessing(obj: EventLog | Trace | DataFrame, pt: ProcessTree, parameters: Dict[Any, Any] | None = None) Dict[str, Any] | List[Dict[str, Any]][source]#
- pm4py.algo.conformance.alignments.process_tree.variants.search_graph_pt.apply(obj: EventLog | Trace | DataFrame, pt: ProcessTree, parameters: Dict[Any, Any] | None = None) Dict[str, Any] | List[Dict[str, Any]][source]#