I am applying community detection algorithms to a weighted network. The weight 
is just a number comprised between 0 and 1. What is puzzling me is that the 
partition returned by the multilevel.community method seems to depend on the 
scaling of the weights, i.e. if one multiplies the weight by 10 etc., whereas 
the fastgreedy.community method is not affected by this scaling issue, i.e. the 
partitions are always the same irrespective of the scale. 


Here is the link to the data I am using 


https://www.dropbox.com/s/yxw7pjrsgqbfjsj/example.csv 


The code applied is the following: 



library(igraph) 


a <- read.csv("example.csv",header=TRUE) 
h <- graph.data.frame(a, directed=FALSE) 
h <- simplify(h, remove.multiple=TRUE, remove.loops=TRUE) 


memberships <- list() 


fg <- fastgreedy.community(h,weights=E(h)$weight) 
memberships$`fg` <- fg$membership 


fg10 <- fastgreedy.community(h,weights=E(h)$weight*10) 
memberships$`fg10` <- fg10$membership 


fg100 <- fastgreedy.community(h,weights=E(h)$weight*100) 
memberships$`fg100` <- fg100$membership 


lm <- multilevel.community(h,weights=E(h)$weight) 
memberships$`lm` <- lm$membership 


lm10 <- multilevel.community(h,weights=E(h)$weight*10) 
memberships$`lm10` <- lm10$membership 


lm100 <- multilevel.community(h,weights=E(h)$weight*100) 
memberships$`lm100` <- lm100$membership 


names=V(h)$name 
out <- as.data.frame(memberships) 
commun <- cbind(names,out) 


Any help would be appreciated. Thanks a lot for the wonderful package you 
maintain. 


Stefano 






-- 

Department of Management & Technology and KITes 

Università L. Bocconi 
Via Roentgen 3 
20136 Milan (Italy) 
Grafton Building 5th floor 
Office B1-02 
tel. +39-02-5836 3365 
fax +39-02-5836 3399 
_______________________________________________
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to