Weighted Clustering

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Weighted Clustering

gjhansen
This post was updated on .
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 edges.

I suspect this is something that I have overlook as I am new to graph-tool.

Thank you.

_______________________________________________
graph-tool mailing list
graph-tool@skewed.de
https://lists.skewed.de/mailman/listinfo/graph-tool
Reply | Threaded
Open this post in threaded view
|

Re: Weighted Clustering

Tiago Peixoto
Administrator
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 <[hidden email]>


_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool

signature.asc (849 bytes) Download Attachment
--
Tiago de Paula Peixoto <tiago@skewed.de>
Reply | Threaded
Open this post in threaded view
|

Re: Weighted Clustering

gjhansen
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/
_______________________________________________
graph-tool mailing list
[hidden email]
https://lists.skewed.de/mailman/listinfo/graph-tool