Running Modularity statistics on the same data set twice generates different numbers of communities?

Computing metrics, community detection and data handling
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
yuling
Posts:13
Joined:06 Mar 2018 00:46
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Running Modularity statistics on the same data set twice generates different numbers of communities?

Post by yuling » 13 Mar 2018 00:03

Hi All,

I was hoping that the communities generated from Modularity statistics could be same of similar if I click the button twice. However, with the same selections of "Randomize", "Use weights", and "Resolution", it first generated 56 communities, and then 79 communities...any idea?

Thanks,
YuLing

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Running Modularity statistics on the same data set twice generates different numbers of communities?

Post by eduramiba » 13 Mar 2018 17:20

Hi,

Modularity is non-deterministic, it depends on the randomization, which chooses what's the starting node. Try to disable it.

Max Viana
Posts:1
Joined:06 May 2018 21:30
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Running Modularity statistics on the same data set twice generates different numbers of communities?

Post by Max Viana » 04 Jun 2018 04:54

I try to do that (disable random mode), but it's still generating different results.

Any idea?

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Running Modularity statistics on the same data set twice generates different numbers of communities?

Post by eduramiba » 04 Jun 2018 10:42

Hi,
Randomization makes the algorithm start in a random node or not. So, several runs in the same workspace should work the same.
But it's possible that due to the graph structure (graphstore) the first node in the graph might change if you load the same file several times.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable