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