Menu

DistanceStatistics.averageDistances broken

2012-03-15
2013-05-29
  • Ell Campbell

    Ell Campbell - 2012-03-15

    I'm trying to calculate the average distance of a graph (~500 vertices), but the output results are uniformly <1.  After some googling, I found this (https://sourceforge.net/tracker/?func=detail&aid=3006509&group_id=73840&atid=539119) unresolved bug report from May 2010.  

    It indicates that it is actually calculating betweenness centrality.

    Is JUNG still under active development at this point, or can I expect that this bug wont be resolved? 

     
  • Joshua O'Madadhain

    First: thanks for bringing that bug to our attention.  That one slipped through, possibly when SourceForge's notification mechanism was broken.

    To your point: DistanceStatistics.averageDistances() is in fact calculating closeness centrality, not betweenness centrality (the former is what that bug says).

    The closeness centrality of a vertex is defined as the average distance (shortest path length) to each other (reachable) vertex.  Which is what DistanceStatistics' documentation claims.

    It's not impossible that there's a bug in our implementation, but that has yet to be demonstrated.

    Do the edges have weights?  If the edge weights are < 1, outputs that are all < 1 are not impossible.

    Joshua

     
  • Ell Campbell

    Ell Campbell - 2012-03-16

    Thank you for your quick reply and clarification, it gives me confidence to keep plugging away with Java/JUNG rather than running back to my comfort zone: Python/NetworkX.

    As to your question:  The edges are unweighted, so that's not the problem.  You've given me enough information to start tracking down my problem though. 

    -ells

     

Log in to post a comment.