January 2018
Beginner to intermediate
262 pages
6h 3m
English
The construction of the graph of maximal cliques or communities is a special case of blockmodeling—grouping network nodes according to some meaningful definition of equivalence and replacing them with synthetic “supernodes.” A more general function nx.quotient_graph(G,part,relabel=True) takes a graph G and its partition part as a list of node collections (lists or sets), and creates an induced graph. Unlike nx.make_max_clique_graph and community.induced_graph, nx.quotient_graph requires the partition includes every node in the original graph at most once. You can manually remove the offending overlapping clique from a clique partition, if you want:
| | cliques = list(nx.find_cliques(G)) |
| <= | [['Golf', 'Hotel', 'Foxtrot'], ['Echo', ... |
Read now
Unlock full access