Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created April 5, 2020 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prateekjoshi565/99d025557b80a94872ccedf75347dc35 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/99d025557b80a94872ccedf75347dc35 to your computer and use it in GitHub Desktop.
# find communities in the graph
c = girvan_newman(G.copy())
# find the nodes forming the communities
node_groups = []
for i in c:
node_groups.append(list(i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment