I have been using the Girvan-Newman algorithm from networkx to find the modularity of a network with 4039 nodes and 88,234 edges. Due to the nature of the algorithm, it was running overnight, and wouldn't complete. Hence I paid for colab pro and I was intending to use CuGraph to speed this up, but can't find a CuGraph algorithm that does work. How would I be able to build one, using the edge centrality algorithm, to produce something similar to this:
G2 = nx.karate_club_graph()
comp = girvan_newman(G2)
node_groups = []
for com in next(comp):
node_groups.append(list(com))
print(node_groups)
color_map = []
for node in G2:
if node in node_groups[0]:
color_map.append('blue')
else:
color_map.append('green')
nx.draw(G2, node_color=color_map, with_labels=True)
plt.show()