
From:  Gaurav Thareja 
Subject:  Re: [igraph] Problem regarding weighted transitivity calculation 
Date:  Thu, 7 May 2015 16:07:58 +0300 
Hi Tamas,
Thank you for your reply.
As per the Barrat et al. formula used in the manual. It shows weights per triangle
are divided by 2.
Then as per your calculations, I should get an output value of 0.5. Kindly clarify?
Secondly, is binary adjacency matrix is used for above calculations?
Regards
Gaurav
Hi,
igraph is correct, changing the weight of that single edge does not change the
weighted transitivity of the vertex. According to the formula in the manual,
the transitivity of vertex B is calculated by taking the sum of weights in all
the triangles that the vertex participates in, restricted to only those edges
that are incident on vertex B, and dividing it by the product of the degree of
the vertex minus 1 and the strength of the vertex (where the strength is
defined as the sum of the weights of the edges incident on it). In the case of
your graph, vertex B participates in three triangles:
BCA, BCD and BAD
Let us now assume that the weight of each edge is w, except edge BC where the
weight is x. In this case, the formula boils down to the following:
 degree of vertex B is 3
 strength of vertex B is x+2*w
 total weight of triangle BCA is x+2*w, but we need to restrict it to edges
incident on B, so we only have x+w
 total weight of triangle BCD is x+2*w, but we need to restrict it again so we
only have x+w
 total weight of triangle BAD is 3*w, but again, for the same reason, we have
2*w only
Therefore, we have x+w+x+w+w+w=2*x+4*w in the numerator and we also have
(31)*(x+2*w) = 2*x+4*w in the denominator. No matter what the exact weights
are, the transitivity will always be 1.
T.
On 04/15, Gaurav Thareja wrote:
> Hi All,
>
> I am currently analyzing networks using igraph package and calculating
> transitivity values.
>
> I am experiencing a problem, that while using code below, when I try to
> find weighted transitivity value by changing weights on the edges still the
> value of the node remains the same. Is this an expected property of
> transitivity implementation (Output is in bold).
>
> Thank you for your help.
>
> Regards
>
> Gaurav Thareja
>
> gw < graph.formula(AB:C:D:E, BC:D, CD)
> E(gw)$weight < 0.05
> E(gw)$color < "grey"
> E(gw)[ V(gw)[name == "B"] %% V(gw)[name == "C" ] ]$weight < 0.5
> E(gw)[ V(gw)[name == "B"] %% V(gw)[name == "C" ] ]$color < "red"
> plot(gw)
> transitivity(gw, type="weight", vids = "B", isolates = c("zero")) *[1]*
> transitivity(gw, type="weight", vids = "C", isolates = c("zero")) *[1]*
>
> ========================================================
>
> #Figure 1: Random value of local clustering coefficent vs weighted
> clustering coefficient.
>
> gw < graph.formula(AB:C:D:E, BC:D, CD)
> E(gw)$weight < 0.05
> E(gw)$color < "grey"
> E(gw)[ V(gw)[name == "B"] %% V(gw)[name == "C" ] ]$weight < 1
> E(gw)[ V(gw)[name == "B"] %% V(gw)[name == "C" ] ]$color < "red"
> plot(gw)
> transitivity(gw, type="weight", vids = "B", isolates = c("zero")) *[1]*
> transitivity(gw, type="weight", vids = "C", isolates = c("zero")) *[1]*
> _______________________________________________
> igraphhelp mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraphhelp

T.
_______________________________________________
igraphhelp mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraphhelp
[Prev in Thread]  Current Thread  [Next in Thread] 