O'Reilly logo

Complex Network Analysis in Python by Dmitry Zinoviev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extract and Name Term Communities

The modularity of the new network is quite poor (we suggestedhere that a network is definitely modular only when the modularity is 0.6 or above):

 partition = community.best_partition(tag_network)
 print​(​"Modularity: {}"​.format(community.modularity(partition,
  tag_network)))
 nx.set_node_attributes(tag_network, partition, ​"part"​)
<= Modularity: 0.15815567681142356

Apparently, counting raw co-occurrences is not the best way to describe similarities—indeed, correlation-based networks are much more flexible, and you will learn about them later (Chapter 14, Similarity-Based Networks). However, even the coarse network that you have allows some meaningful interpretation.

The partition that you extracted ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required