Community Detection, Louvain, Leiden, Getting Started.
cdlib import algorithms import networkx as nx G = nx.karate_club_graph() coms = algorithms.louvain(G, weight=’weight’, resolution=1., randomize=False) 2. Surprise Community Detection Due to limitations of the modularity, a measure based on classical probabilities known as Surprise has been