[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Creation of a plot showing clustering coefficient depending
From: |
Tamás Nepusz |
Subject: |
Re: [igraph] Creation of a plot showing clustering coefficient depending on degree k |
Date: |
Tue, 13 Mar 2012 21:00:30 +0100 |
> I did
> cluster=transitivit(G, type="local")
> So I've got a vector containing value, and NA.
>
> Q1: Does the value correspond to C(i) or C(k)?
The i-th element in the resulting vector is the clustering coefficient of the
(i-1)-th vertex (note that vertices are indexed from zero in igraph up to
0.5.x), where the clustering coefficient is defined as the number of connected
neighbor pairs of the vertex, divided by the total number of possible neighbor
pairs.
> Q2: Are the values ordered by degree (k) or by nodes in the vector?
By nodes.
> Q3: If it's ordered by degree, I guess that the first degree in that is 1
> since degree 0 has no neighbors?
Not applicable; the result is ordered by nodes and not by degree.
> Q5: for the mean of cluster coeffcient, If I remove the NA, its change the
> length of my vector so the mean, what is the correct mean in that case?
You see NAs because the clustering coefficient is undefined for vertices with
only one neighbour, since there are no neighbor pairs for that vertex. You can
either replace the NAs with zeros or ignore them completely; it is up to you.
There is no standard definition for the clustering coefficient in this case.
Personally, I would use zeros, because a graph with many degree-1 vertices is
definitely "less clustered" than a similar one with no degree-1 vertices.
Best,
T.