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

Reply via email to