igraph-help
[Top][All Lists]
Advanced

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

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


From: Tamas Nepusz
Subject: Re: [igraph] Is there a need to transform an adjacency matrix: clustering
Date: Mon, 6 Oct 2014 16:50:10 +0200

Hello,

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


All the best,
-- 
T.

On 3 October 2014 at 12:21:21, Dylan Young (address@hidden) 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
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help

reply via email to

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