igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Community detection algorithm for (almost) full weighted graph


From: capitano . nemo
Subject: [igraph] Community detection algorithm for (almost) full weighted graph
Date: Thu, 23 Oct 2014 23:34:57 +0000
User-agent: Roundcube Webmail

Hello,

I have a series of graphs created from dense matrices such as

r1 <- c(NA, 0.2, 0.3, 0)
r2 <- c(NA, NA, 0.4, 0.6)
r3 <- c(NA, NA, NA, 0.1)
r4 <- rep(NA, 4)
m <- rbind(r1,r2,r3,r4)
rownames(m) <- seq(1:4)
colnames(m) <- seq(1:4)
m
# 1   2   3   4
# 1 NA 0.2 0.3 0.0
# 2 NA  NA 0.4 0.6
# 3 NA  NA  NA 0.1
# 4 NA  NA  NA  NA

For this matrix I create a graph with

g <- graph.adjacency(m, mode="undirected", weighted=TRUE, diag=FALSE)

My real graphs are not extremely large (the largest has 11249 nodes) but they are pretty dense: as in the example above nodes have relations with almost every other nodes, but without any multiedge. Yet each edge is weighted. The "weight" attribute of the edge is the closeness of the pair of nodes. That is, for example an edge with a "weight" of 0.5 indicates that the endpoints are closer than a endpoints with an edge of 0.3. I am interested in drawing communities that reflect the "closeness" among nodes.

Then I want to apply a community detection algorithm which will evaluate graph structure mainly on edges' weights.

I tested

fastgreedy.community(g)

on my small graph and it works pretty well in dividing nodes according to edges' weight.

But I wonder if I should use other algos that better capture the weighted structure of my graph.

Thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]