pm4py.algo.discovery.dfg.variants.case_attributes module#
PM4Py – A Process Mining Library for Python Copyright (C) 2026 Process Intelligence Solutions GmbH
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.discovery.dfg.variants.case_attributes.Parameters(*values)[source]#
Bases:
Enum- ACTIVITY_KEY = 'pm4py:param:activity_key'#
- CASE_ATTRIBUTES = 'case_attributes'#
- RETURN_NODES_ATTRIBUTES = 'return_nodes_attributes'#
- pm4py.algo.discovery.dfg.variants.case_attributes.apply(log: EventLog, parameters: Dict[str | Parameters, Any] | None = None) Tuple[Dict[Tuple[str, str], Dict[str, Dict[str, Any]]], Dict[str, Dict[str, Dict[str, Any]]]] | Dict[Tuple[str, str], Dict[str, Dict[str, Any]]][source]#
Discovers a directly-follows graph from an event log, with the edges that are annotated with the different values for the given case attributes.
- Parameters:
log – Event log
parameters – Parameters of the variant, including: - Parameters.ACTIVITY_KEY => the attribute to use as activity - Parameters.CASE_ATTRIBUTES => the case attributes that are used to annotate the edges (default: the case ID) - Parameters.RETURN_NODES_ATTRIBUTES => (optional) returns also a dictionary with the values of the attributes for each activity of the graph (default: False)
- Returns:
dfg –
- Directly-follows graph (with the edges annotated with the specified case attributes), e.g.:
- {(‘register request’, ‘examine casually’): {‘creator’: {‘Fluxicon Nitro’: 3}, ‘concept:name’:
{‘3’: 1, ‘6’: 1, ‘5’: 1}} …
nodes –
- (Optional) dictionary of activities (annotated with the specified case attributes), e.g.:
- {‘register request’: {‘creator’: {‘Fluxicon Nitro’: 6}, ‘concept:name’:
{‘3’: 1, ‘2’: 1, ‘1’: 1, ‘6’: 1, ‘5’: 1, ‘4’: 1}} …