igraph-help
[Top][All Lists]

## [igraph] Problem regarding weighted transitivity calculation

 From: Gaurav Thareja Subject: [igraph] Problem regarding weighted transitivity calculation Date: Wed, 15 Apr 2015 15:13:01 +0300

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).

Regards

Gaurav Thareja

gw <- graph.formula(A-B:C:D:E, B-C:D, C-D)
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(A-B:C:D:E, B-C:D, C-D)
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]