Skip to content

Where are the communities for disconnected nodes of a graph? #194

Answered by JohannHM
JohannHM asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @danieledler thank for your opinion.
Im working with cdlib library that uses exactly the same code here. In fact this python example was tested on your web of infomap with the same results. The idea is attacking a network by removing some hubs, thus some disconnected nodes appear, and then applying infomap. Recovering the nodes after infomap with those before applying it. Look at this:

import networkx as nx
import math

g = nx.karate_club_graph()                  # karate-club network  
k1 = dict(g.degree())                       # taking its degree k1

percentage = 10                                 # percentage of nodes to remove
n_nodes = math.floor(percentage*len(k1)/100)    # num …

Replies: 2 comments 15 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
15 replies
@JohannHM
Comment options

@antoneri
Comment options

@JohannHM
Comment options

@danieledler
Comment options

@JohannHM
Comment options

Answer selected by antoneri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants