Created
April 5, 2020 13:52
-
-
Save prateekjoshi565/ae08ff16616fda0c0cd858203566d35a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def edge_to_remove(graph): | |
G_dict = nx.edge_betweenness_centrality(graph) | |
edge = () | |
# extract the edge with highest edge betweenness centrality score | |
for key, value in sorted(G_dict.items(), key=lambda item: item[1], reverse = True): | |
edge = key | |
break | |
return edge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment