pm4py.algo.label_splitting.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
Submodules#
pm4py.algo.label_splitting.variants.contextual 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.label_splitting.variants.contextual.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'#
- CASE_ID_KEY = 'pm4py:param:case_id_key'#
- INDEX_KEY = 'index_key'#
- TARGET_COLUMN = 'target_column'#
- ACTIVITIES_SUFFIX = 'activities_suffix'#
- TARGET_ACTIVITIES = 'target_activities'#
- PREFIX_LENGTH = 'prefix_length'#
- SUFFIX_LENGTH = 'suffix_length'#
- MIN_EDGE_WEIGHT = 'min_edge_weight'#
- pm4py.algo.label_splitting.variants.contextual.apply(log: EventLog | EventStream | DataFrame, parameters: Dict[Any, Any] | None = None) DataFrame [source]#
Applies the technique of contextual label-splitting, to distinguish between different meanings of the same activity. The result is a Pandas dataframe where the contextual label-splitting has been applied.
Reference paper: van Zelst, Sebastiaan J., et al. “Context-Based Activity Label-Splitting.” International Conference on Business Process Management. Cham: Springer Nature Switzerland, 2023.
Minimum Viable Example:
import pm4py from pm4py.algo.label_splitting import algorithm as label_splitter
log = pm4py.read_xes(“tests/input_data/receipt.xes”) log2 = label_splitter.apply(log, variant=label_splitter.Variants.CONTEXTUAL)
Parameters#
- log
Event log
- parameters
Possible parameters of the algorithm, including: - Parameters.PREFIX_LENGTH => the length of the prefix to consider in the context - Parameters.SUFFIX_LENGTH => the length of the suffix to consider in the context - Parameters.MIN_EDGE_WEIGHT => the minimum weight for an edge to be included in the segments graph - Parameters.TARGET_ACTIVITIES => the activities which should be targeted by the relabeling (default: all) - Parameters.TARGET_COLUMN => the column that should contain the re-labeled activity
Returns#
- dataframe
Pandas dataframe with the re-labeling