Thank you, that is far more elegant than what I had written.

 

How does graph-tool handle the clustering coefficient for nodes where k=1? Does it assume a value of 0 or is it undefined?

 

From: Tiago Peixoto [via Main discussion list for the graph-tool project] [mailto:[hidden email]]
Sent: 15 August 2016 12:15
To: P-M <[hidden email]>
Subject: Re: Average Clustering Coefficient Distribution

 

On 08.08.2016 17:11, P-M wrote:
> I am interested in computing the distribution of clustering coefficient with
> degree, c(k), for a network of mine (c.f. e.g. p. 102 in
> dx.doi.org/10.1038/nrg1272 ). Before I go and write a script to calculate
> this using the local_clustering method implemented in graph-tool I was
> wondering if anybody knew of any methods implemented to this end already?

This is essentially a two-liner:

   c = local_clustering(g)
   h = avg_combined_corr(g, "out", c)


--
Tiago de Paula Peixoto <[hidden email]>


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


signature.asc (836 bytes) Download Attachment

--
Tiago de Paula Peixoto <[hidden email]>

 


If you reply to this email, your message will be added to the discussion below:

http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/Average-Clustering-Coefficient-Distribution-tp4026691p4026698.html

To unsubscribe from Average Clustering Coefficient Distribution, click here.
NAML



View this message in context: RE: Average Clustering Coefficient Distribution
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.