igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Clustering coefficient vs. transitivity


From: Tamas Nepusz
Subject: Re: [igraph] Clustering coefficient vs. transitivity
Date: Tue, 6 Jul 2010 10:17:17 +0100

Dear Jonathan,

> I'm using igraph 0.6 via the Python interface. From some test cases I
> get the impression, that the function transitivity_undirected actually
> gives the mean value of transitivity_local_undirected. Is this
> correct?
No; transitivity_avglocal_undirected is the mean value of 
transitivity_local_undirected. transitivity_undirected is indeed according to 
Eq.~(2.8) in the Boccaletti review; that is, 3 x (# of triangles) / (# of 
connected triplets):

>>> g = Graph.GRG(100, 0.2)
>>> g.transitivity_undirected()
0.63212
>>> g.transitivity_avglocal_undirected()
0.64516
>>> sum(g.transitivity_local_undirected())/g.vcount()
0.64516

Also note that there are two possible ways to define 
transitivity_local_undirected(), depending on how vertices with degree less 
than two are treated. igraph can either treat them as havng zero local 
transitivity, or return NaN (not a number).

-- 
Tamas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]