How to cluster a graph using python igraph
问题 I've been using python igraph to try to make an easier time of generating and analyzing graphs. My code below generates a random graph of 50 nodes and clusters it: from igraph import * import random as rn g = Graph() size = 50 g.add_vertices(size) vert = [] for i in range(size): for j in range(size): test = rn.randint(0,5) if j >= i or test is not 0: continue g.add_edges([(i,j)]) #layout = g.layout("kk") #plot(g, layout = layout) #dend = VertexDendrogram(graph=g, optimal_count=10) clust =