pm4py.algo.organizational_mining.sna.util module#

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