I have an edge property for weight. The weight for each edge is one integer between 1 and 4. The unweighted global clustering coefficient is about 0.45. The weighted global clustering coefficient is -0.61. Are negative values in the range? Additionally, if I filter on edge weight and calculate the weighted clustering I get values > 1.0. If all weights are 3, for example, would we not expect the same coefficient for weighted and unweighted. The unweighted coefficient for the above example is reasonable. The graph has 22K vertices and 3.7M nodes. I suspect this is something that I have overlook as I am new to graph-tool. Thank you.
I have an edge property for weight. The weight for each edge is one integer between 1 and 4. The unweighted global clustering coefficient is about 0.45. The weighted global clustering coefficient is -0.61. Are negative values in the range? Additionally, if I filter on edge weight and calculate the weighted clustering I get values > 1.0. If all weights are 3, for example, would we not expect the same coefficient for weighted and unweighted. The unweighted coefficient for the above example is reasonable. The graph has 22K vertices and 3.7M nodes. I suspect this is something that I have overlook as I am new to graph-tool. Thank you! Sorry if I managed to post the 2x
Am 15.05.20 um 17:59 schrieb Hansen, Glenn J.:
I have an edge property for weight. The weight for each edge is one integer between 1 and 4. The unweighted global clustering coefficient is about 0.45. The weighted global clustering coefficient is -0.61. Are negative values in the range?
Negative values should not be possible. Please provide a minimal and self-contained example that shows the problem.
Additionally, if I filter on edge weight and calculate the weighted clustering I get values > 1.0. If all weights are 3, for example, would we not expect the same coefficient for weighted and unweighted. The unweighted coefficient for the above example is reasonable.
As is explained in the documentation, the clustering values are normalized only if the weights are all below 1. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
Thank you for your help. I figured out the problem. I was using "int" as the edge property dtype when I should have used int64_t. Again thank you! -- Sent from: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/
participants (3)
-
gjhansen -
Hansen, Glenn J. -
Tiago de Paula Peixoto