title: meaning of weights in community detection algorithms
body: <p>There is an excellent comparison of community detection algorithms available in igraph <a href="https://stackoverflow.com/questions/9471906/what-are-the-differences-between-community-detection-algorithms-in-igraph">here</a>. However, there's some ambiguity about the use of weights in the algorithms that can be applied with weighted edges.</p>
  
  <p>Typically, edge weights will be oriented so that higher weights suggest keeping the nodes together (eg strength of friendship). This works nicely with modularity scores by comparing average weighted density within and externally.</p>
  
  <p>However, the Newman-Girvan community detection algorithm uses betweenness, which is based on distances. In this case, I would expect that the edge weights should reflect the distance between nodes so that calculating shortest paths sums the weights over the path. That is, the weight is a cost or distance score, where higher values should break into different communities.</p>
  
  <p>Am I correct in expecting higher weights for greater distances when using Newman-Girvan and, if so, how then does this reconcile with using modularity to decide where to cut the number of communities?</p>