I am building a directed graph with weights, where the higher the weight, the more "connected" the nodes are (in my use case weight is the sum of interactions between 2 nodes). I am using Networkx to model the graph and to compute 2 things:
- communities
- most influential node in each community for this, I use louvain_communities for communities detection, and multiple centrality metrics, which I compare (closeness_centrality, betweenness_centrality, eigenvector_centrality, pagerank)
My question is:
For each of these metrics\algorithms (i.e., louvain
and all of the centrality metrics), is the weight means "distance" or "closeness"?
Should I use weight=weight
or weight=1/weight
?
I tried to read the documentation but its quite confusing