pm4py.algo.organizational_mining.util module#
- class pm4py.algo.organizational_mining.util.Parameters(*values)[source]#
Bases:
Enum- RESOURCE_KEY = 'pm4py:param:resource_key'#
- ACTIVITY_KEY = 'pm4py:param:activity_key'#
- GROUP_KEY = 'pm4py:param:group_key'#
- pm4py.algo.organizational_mining.util.get_groups_from_log(log_obj: DataFrame | EventLog, parameters: Dict[Any, str] | None = None) Dict[str, Dict[str, int]][source]#
From the log object, where events have a group, a resource and an activity attribute, gets a dictionary where the first key is a group, the second key is a resource and the value is the number of events done by the resource when belonging to the given group.
- Parameters:
log_obj – Log object
parameters – Parameters of the algorithm, including: - Parameters.RESOURCE_KEY => the resource attribute - Parameters.ACTIVITY_KEY => the activity attribute - Parameters.GROUP_KEY => the group
- Returns:
Aforementioned dictionary
- Return type:
- pm4py.algo.organizational_mining.util.get_res_act_from_log(log_obj: DataFrame | EventLog, parameters: Dict[Any, str] | None = None) Tuple[Dict[str, Dict[str, int]], Dict[str, Dict[str, int]]][source]#
From the log object, where events have a group, a resource and an activity attribute, gets two dictionaries: - The first, where the first key is the resource, the second key is the activity and the third is the number of
events of the given activity done by the given resource
- The second, where the first key is the activity, the second key is the resource and the third is the number of
events of the given activity done by the given resource
- Parameters:
log_obj – Log object
parameters – Parameters of the algorithm, including: - Parameters.RESOURCE_KEY => the resource attribute - Parameters.ACTIVITY_KEY => the activity attribute - Parameters.GROUP_KEY => the group
- Returns:
res_act – Dictionary resources-activities-occurrences
act_res – Dictionary activities-resources-occurrences
- pm4py.algo.organizational_mining.util.get_resources_from_log(log_obj: DataFrame | EventLog, parameters: Dict[Any, str] | None = None) Dict[str, int][source]#
Gets the resources, along with the respective number of events, from the log object
- Parameters:
log_obj – Log object
parameters – Parameters of the algorithm, including: - Parameters.RESOURCE_KEY => the resource attribute - Parameters.ACTIVITY_KEY => the activity attribute - Parameters.GROUP_KEY => the group
- Returns:
Dictionary of resources along with their occurrences
- Return type:
resources_dictionary