spmviz.networks.pattern_communities#

spmviz.networks.pattern_communities(ps, similarity='transaction', knn=8, threshold=None, resolution=1.0, seed=0, **kw)[source]#

Groups of patterns that tend to occur in the same sequences (sub-processes).

Louvain communities (Blondel et al., 2008) of the similarity graph. With the transaction similarity, a community gathers patterns supported by the same traces: the events of a sub-process running in parallel with others, the question that motivated the NBVFS-TM map.

Returns:
labelsnumpy.ndarray

Community of every pattern (0 = largest).

modularityfloat
graphnetworkx.Graph

The similarity graph with a community node attribute.

Examples using spmviz.networks.pattern_communities#

Beyond the paper: fused similarities and pattern communities

Beyond the paper: fused similarities and pattern communities