pm4py.algo.organizational_mining.sna.util 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.organizational_mining.sna.util.Parameters(*values)[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:

NetworkX Graph / DiGraph

Return type:

nx_graph

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:

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

Return type:

clustering