How come CNM and Wakita Clusters are not giving the same results?

May 10, 2010 at 8:25 AM

Hello Tony,

In our previous discussions i mentioned that Wakita Algorithms do not use consolidation ratios for merging communities.

As far as i see it, the two algorithms are the same (apart from data structures) they are using, so how can they give different results?.





May 11, 2010 at 6:37 PM


I'll investigate and get back to you.

-- Tony

May 13, 2010 at 6:33 PM


My guess is that it involves the precision of the calculations.  NodeXL's implementation of Wakita-Tsurumi uses single-precision math, while SNAP's implementation of Clauset-Newman-Moore uses double-precision.  When I revisit Wakita-Tsurumi to add one of the consolidation ratio heuristics, I'll also experiment with switching to double-precision to see if that has an appreciable effect.

-- Tony

Jun 21, 2010 at 1:43 PM
Hi everyone! I downloaded Wakitah’s algorithm. A would like to ask, how can run the algorithm? I tried on both platforms, but it isn’t working, it gives error messages. I have another question, how can i reach the code? Thanks Laslo
Jun 21, 2010 at 5:06 PM
Edited Jun 21, 2010 at 5:07 PM


Please provide more details.  Are you attempting to use the Wakita-Tsurumi algorithm from the Excel Template, or from your own application?  In either case, please include the error message that you are getting.

The NodeXL source code can be found here:

As of June 21, 2010, the source code for the Wakita-Tsurumi algorithm can be found here:

-- Tony

Jun 22, 2010 at 10:03 AM



I was talking about the  algorithm of Wakita and Tsurumi. I downloaded the algorithm from the home page of Ken Wakita. It’s a java source code. I tried to run the program on windows platform with run.bat, and I tried on Linux with I had error messages NoClassDefFoundError.

I misunderstood, I thought that you are talking about the java source code.

-- Laslo

Jun 25, 2010 at 6:20 PM


I have Visual Studio 2008 and NodeXL installed on my computer. I have some input graphs. I would like to run the CNM algorithm and the algorithm of Wakita and Tsurumi and I want to use the heuristics from the paper.  I want to study partitions of the algorithm and the modularity.  How can I run this algorithm, and how can I add an input to it?




Jun 26, 2010 at 5:26 AM


The easiest way to run the algorithm is to import your graph into the NodeXL Excel Template, then select NodeXL, Analysis, Find Clusters from the Excel ribbon.  Or if you are writing your own application, you can use the Microsoft.NodeXL.Algorithms.ClusterCalculator class, which is what Find Clusters in the Excel Template uses internally.

However, NodeXL's current implementation of the Wakita-Tsurumi algorithm uses the data structure introduced by Wakita and Tsurumi to dramatically improve performance, but it does not use the authors' consolidation ratio heuristics.  Please see this discussion:

-- Tony

Jul 5, 2010 at 8:53 PM


I have  another question. When I run one of the algorithms, where can I find the modularity of a partion?


Jul 6, 2010 at 1:16 AM


We don't expose the modularities in the API, because we don't use them in our own application.  You will have to modify the source code if you need them.

-- Tony