pm4py.algo.enhancement.organizational_mining package

Subpackages

Submodules

pm4py.algo.enhancement.organizational_mining.util 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.enhancement.organizational_mining.util.Parameters(value)[source]

Bases: enum.Enum

An enumeration.

ACTIVITY_KEY = 'pm4py:param:activity_key'
GROUP_KEY = 'pm4py:param:group_key'
RESOURCE_KEY = 'pm4py:param:resource_key'
pm4py.algo.enhancement.organizational_mining.util.get_groups_from_log(log_obj: Union[pandas.core.frame.DataFrame, pm4py.objects.log.obj.EventLog], parameters: Optional[Dict[Any, str]] = 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

dict

pm4py.algo.enhancement.organizational_mining.util.get_res_act_from_log(log_obj: Union[pandas.core.frame.DataFrame, pm4py.objects.log.obj.EventLog], parameters: Optional[Dict[Any, str]] = 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.enhancement.organizational_mining.util.get_resources_from_log(log_obj: Union[pandas.core.frame.DataFrame, pm4py.objects.log.obj.EventLog], parameters: Optional[Dict[Any, str]] = 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

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/>.