Dear List,
I have coded this function to calculate redundancy in bipartite
networks as specified in Latapy, Magnien, Del Vecchio "Basic notions
for the analysis of large two-mode networks", Social Networks 30
(2008) 31–48:
redundancy<-function(g){
redundancy<-c()
for(i in V(g)[which(V(g)$type==FALSE)]){
overlap <- 0
nei<-neighbors(g,i)
if(length(nei)>0){
comb<-combn(nei, 2)
for(c in seq(1:dim(comb)[2])){
unei<-neighbors(g,comb[1,c])
wnei<-neighbors(g,comb[2,c])
redund<-Reduce(union, list(unei,wnei))
redund<-Reduce(setdiff, list(redund,i))
if(length(redund)>0){
overlap <- overlap + 1
}
}
}
if(overlap > 0){
n <- length(nei)
norm<-2.0/(n*(n-1))
} else {
norm <- 1
}
redundancy<-append(redundancy, overlap*norm)
}
return(redundancy)
}
I quote here their words:
"In other words, the redundancy coefficient of v is the fraction of
pairs of neighbours of v linked to another node than v. In the
projection, these nodes would be linked together even if v were not
there, see Fig. 9; this is why we call this the redundancy. If it is
equal to 1 then the projection would be exactly the same without v; if
it is 0 it means that none of its neighbours would be linked together
in the projection."
and:
"the notion of redundancy we propose here is equivalent to the
generalisation of the notion of clustering coefficient to squares,
denoted by C4( ), proposed independently in Lind et al. (2005): it is
the probability, when a node has two neighbours, that these two nodes
have (another) neighbour in common."
and here's the reference for Lind (2005):
Lind, P.G., Gonzlez, M.C., Herrmann, H.J., 2005. Cycles and clustering
in bipartite networks. ArXiV preprint cond-mat/0504241.
The problem I have is that this function reports always 1, no matter
the network I use... is there something wrong in the way I call igraph
nodes?
Any advice or help are more than welcome...
Best regards,
Simone
--
Simone Gabbriellini, PhD
PostDoc@DISI, University of Bologna
mobile: +39 340 39 75 626
email: [email protected]
home: www.digitaldust.it
DigitalBrains srl
Amministratore
mobile: +39 340 39 75 626
email: [email protected]
home: www.digitalbrains.it
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help