pm4py.algo.organizational_mining.sna 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#

Submodules#

pm4py.algo.organizational_mining.sna.algorithm 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.organizational_mining.sna.algorithm.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'#
RESOURCE_KEY = 'pm4py:param:resource_key'#
METRIC_NORMALIZATION = 'metric_normalization'#
class pm4py.algo.organizational_mining.sna.algorithm.Variants(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

HANDOVER_LOG = <module 'pm4py.algo.organizational_mining.sna.variants.log.handover' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\organizational_mining\\sna\\variants\\log\\handover.py'>#
WORKING_TOGETHER_LOG = <module 'pm4py.algo.organizational_mining.sna.variants.log.working_together' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\organizational_mining\\sna\\variants\\log\\working_together.py'>#
SUBCONTRACTING_LOG = <module 'pm4py.algo.organizational_mining.sna.variants.log.subcontracting' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\organizational_mining\\sna\\variants\\log\\subcontracting.py'>#
JOINTACTIVITIES_LOG = <module 'pm4py.algo.organizational_mining.sna.variants.log.jointactivities' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\organizational_mining\\sna\\variants\\log\\jointactivities.py'>#
HANDOVER_PANDAS = <module 'pm4py.algo.organizational_mining.sna.variants.pandas.handover' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\organizational_mining\\sna\\variants\\pandas\\handover.py'>#
WORKING_TOGETHER_PANDAS = <module 'pm4py.algo.organizational_mining.sna.variants.pandas.working_together' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\organizational_mining\\sna\\variants\\pandas\\working_together.py'>#
SUBCONTRACTING_PANDAS = <module 'pm4py.algo.organizational_mining.sna.variants.pandas.subcontracting' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\organizational_mining\\sna\\variants\\pandas\\subcontracting.py'>#
JOINTACTIVITIES_PANDAS = <module 'pm4py.algo.organizational_mining.sna.variants.pandas.jointactivities' from 'C:\\Users\\berti\\pm4py-core\\pm4py\\algo\\organizational_mining\\sna\\variants\\pandas\\jointactivities.py'>#
pm4py.algo.organizational_mining.sna.algorithm.apply(log: EventLog | DataFrame, parameters: Dict[str | Parameters, Any] | None = None, variant=Variants.HANDOVER_LOG) SNA[source]#

Calculates a SNA metric

Parameters#

log

Log

parameters

Possible parameters of the algorithm

variant
Variant of the algorithm to apply. Possible values:
  • Variants.HANDOVER_LOG

  • Variants.WORKING_TOGETHER_LOG

  • Variants.SUBCONTRACTING_LOG

  • Variants.JOINTACTIVITIES_LOG

  • Variants.HANDOVER_PANDAS

  • Variants.WORKING_TOGETHER_PANDAS

  • Variants.SUBCONTRACTING_PANDAS

  • Variants.JOINTACTIVITIES_PANDAS

Returns#

tuple

Tuple containing the metric matrix and the resources list

pm4py.algo.organizational_mining.sna.util 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.organizational_mining.sna.util.Parameters(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: Enum

WEIGHT_THRESHOLD = 'weight_threshold'#
pm4py.algo.organizational_mining.sna.util.sna_result_to_nx_graph(sna: SNA, parameters=None)[source]#

Transforms the results of SNA to a NetworkX Graph / DiGraph object (depending on the type of analysis).

Parameters#

sna

Result of a SNA operation

parameters

Parameters of the algorithm, including: - Parameters.WEIGHT_THRESHOLD => the weight threshold (used to filter out edges)

Returns#

nx_graph

NetworkX Graph / DiGraph

pm4py.algo.organizational_mining.sna.util.cluster_affinity_propagation(sna: SNA, parameters=None) Dict[str, List[str]][source]#

Performs a clustering using the affinity propagation algorithm provided by Scikit Learn

Parameters#

sna

Result of a SNA operation

parameters

Parameters of the algorithm

Returns#

clustering

Dictionary that contains, for each cluster that has been identified, the list of resources of the cluster