Hello,

spinglass.community() ignores the directions of the edges, as stated in its 
documentation [1].

[1]: http://www.inside-r.org/packages/cran/igraph/docs/spinglass.community

All the best,
-- 
T.

On 3 October 2014 at 12:21:21, Dylan Young ([email protected]) wrote:

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  

_______________________________________________  
igraph-help mailing list  
[email protected]  
https://lists.nongnu.org/mailman/listinfo/igraph-help  
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to