|
From: | patricia |
Subject: | [igraph] : compare membership |
Date: | Tue, 9 Dec 2014 07:37:03 +0300 |
follows function : EdgesBetweenClusters <- function(graph, numTrials, numberVertices) { require(igraph); communities <- infomap.community(graph, v.weights = NULL, modularity = TRUE, nb.trials = numTrials); for(i in 1:numberVertices-1) { for(j in i+1:numberVertices) { if(membership(communities)[i] == membership(communities)[j]) { edgesintracluster <- edgesintracluster + 1; } else { edgesintercluster <- edgesintercluster + 1; } } } return(edgesintercluster); } => attached the following file in xml format |
Iris.xml
Description: application/xml
[Prev in Thread] | Current Thread | [Next in Thread] |