cdlib.algorithms.mnmf

mnmf(g_original: object, dimensions: int = 128, clusters: int = 10, lambd: float = 0.2, alpha: float = 0.05, beta: float = 0.05, iterations: int = 200, lower_control: float = 1e-15, eta: float = 5.0) → cdlib.classes.node_clustering.NodeClustering

The procedure uses joint non-negative matrix factorization with modularity based regul;arization in order to learn a cluster memmbership distribution over nodes. The method can be used in an overlapping and non-overlapping way.

Supported Graph Types

Undirected Directed Weighted
Yes No No
Parameters:
  • g_original – a networkx/igraph object
  • dimensions – Number of dimensions. Default is 128.
  • clusters – Number of clusters. Default is 10.
  • lambd – KKT penalty. Default is 0.2
  • alpha – Clustering penalty. Default is 0.05.
  • beta – Modularity regularization penalty. Default is 0.05.
  • iterations – Number of power iterations. Default is 200.
  • lower_control – Floating point overflow control. Default is 10**-15.
  • eta – Similarity mixing parameter. Default is 5.0.
Returns:

NodeClustering object

Example:
>>> from cdlib import algorithms
>>> import networkx as nx
>>> G = nx.karate_club_graph()
>>> coms = algorithms.mnmf(G)
References:

Wang, Xiao, et al. “Community preserving network embedding.” Thirty-first AAAI conference on artificial intelligence. 2017.

Note

Reference implementation: https://karateclub.readthedocs.io/