computeModules: Function "computeModules"

Description

This function takes a bipartite weighted graph and computes modules by applying Newman's modularity measure in a bipartite weighted version to it.
metaComputeModules re-runs the algorithm several times, returning the most modular result, to stabilise modularity computation.

Arguments

web

web is the matrix representing the weighted bipartite graph (as an example, see e.g. web "small1976" in this package).

method

Choice between the algorithm(s) provided by Stephen Beckett (2016) or Dormann & Strauss (2016). Defaults to the much faster and in the majority of cases better algorithm of Beckett. (Note the optional argument forceLPA to use his slightly inferior but even faster pure LPA algorithm.)

deep

If deep is set to FALSE (default), a flat clustering is computed, otherwise submodules are identified recursively within modules. Works only with method="DormannnStrauss".

deleteOriginalFiles

If deleteOriginalFiles is set to TRUE (default), the files mentioned above in the description are deleted from the hard drive disk, otherwise not.

steps

steps is the number of steps after which the computation of modules stops if no better division into modules than the current one can be found.

tolerance

How small should the difference between MCMC-swap results be? At some point computer precision fluctuations make the algorithm fail to converge, which is why we choose a (very low) defaults of 1E-10.

experimental

Logical; using an undescribed and untested version for which no detail is available? (We suggest: not yet.)

moduleObject

Output from running computeModules.

forceLPA

Logical; should the even faster pure LPA-algorithm of Beckett be used? DIRT-LPA, the default, is less likely to get trapped in a local minimum, but is slightly slower. Defaults to FALSE.

N

Number of replicate runs; defaults to 5.

...

Arguments passed on to computeModules, which is called internally.

Value

An object of class "moduleWeb" containing information about the computed modules. For details, please refer to the corresponding documentation file.

Note

For perfectly compartmentalised networks the algorithm may throw an error message. Please add a little bit of noise (e.g. uniform between 0 and 1 or so) or a small constant (1E-5 or so) and it will work again.

When using the method DormannStrauss, files are written onto the hard drive during the computation. These files are by default deleted after the computation terminates, unless it breaks. Details of the modularity algorithm can be found in Dormann \& Strauß (2013).