igraph-help
[Top][All Lists]
Advanced

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

[igraph] Is there a need to transform an adjacency matrix: clustering


From: Dylan Young
Subject: [igraph] Is there a need to transform an adjacency matrix: clustering
Date: Fri, 03 Oct 2014 11:20:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

Hello,
I have a weighted digraph that I would like to analyse for clusters using the spinglass.community algorithm (the digraph includes negative weights). Direction in the matrix is from i to j.

I have created an adjacency matrix in igraph (using R) using:

mat.adj <- graph.adjacency(my.matrix, weighted = TRUE, mode = "directed", diag = TRUE)

when I plot the graph the edge direction between vertices is correct.

However, I wondered if the matrix (my.matrix) needs to be transformed before creating the adjacency matrix for implementation of the spinglass.community algorithm so that the edge direction is from j to i as noted in Newman 2010 pp. 114 (Networks, An Introduction). I presumed not because the graph plots correctly without transforming.

I use the following code for the spinglass algorithm:

mat.communities <- spinglass.community(mat.adj, spins=15, implementation="neg", gamma=1.0, gamma.minus=1.0, weights=NULL, update.rule="config")

Could you advise?
Thanks,
Dylan



reply via email to

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