Functions "LPA_wb_plus" and "DIRT_LPA_wb_plus"
Use computeModules
to call this function! This function takes a bipartite weighted graph and computes modules by applying Newman's modularity measure in a bipartite weighted version to it. To do so, it uses Stephen J Beckett's DIRTLPAwb+ (or LPAwb+) algorithm, which builds on Liu & Murata's approach. In contrast to the tedious MCMC-swapping QuanBiMo algorithm, this algorithm works by aggregating modules until no further improvement of modularity can be achieved.
DIRT_LPA_wb_plus(MATRIX, mini=4, reps=10) LPA_wb_plus(MATRIX, initialmoduleguess=NA) convert2moduleWeb(MATRIX, MODINFO)
MATRIX |
|
mini |
Minimal number of modules the algorithm should start with; defaults to 4. See explanation of initialmoduleguess to understand why not starting with one module per species interaction makes sense. |
reps |
Number of trials to run for each setting of mini; defaults to 10 but my benefit from higher values. |
initialmoduleguess |
Optional vector with labels for the modules of the longer web dimension. The initialmoduleguess argument in |
MODINFO |
Object returned by |
LPA_wb_plus
computes the modules. DIRT_LPA_wb_plus
is a wrapper calling LPA_wb_plus
repeatedly to avoid getting stuck in some local minimum. Both return a simple list of row and column labels for the modules, as well as the modularity value. Using convert2moduleWeb
turns this into the richer moduleWeb-class object produced by computeModules
. For this object, the plotting function plotModuleWeb
and summary functions listModuleInformation
and printoutModuleInformation
are available.
Stephen J Beckett (https://github.com/sjbeckett/weighted-modularity-LPAwbPLUS), lifted, with consent of the author, by Carsten F. Dormann to bipartite
Beckett, S.J. 2016 Improved community detection in weighted bipartite networks. Royal Society open science 3, 140536.
Liu X. & Murata T. 2010. An Efficient Algorithm for Optimizing Bipartite Modularity in Bipartite Networks. Journal of Advanced Computational Intelligence and Intelligent Informatics (JACIII) 14 408–415.
Newman M.E.J. 2004. Physical Review E 70 056131
computeModules
; see also class "moduleWeb", listModuleInformation
, printoutModuleInformation
## Not run: (res <- DIRT_LPA_wb_plus(small1976)) mod <- convert2moduleWeb(small1976, res) plotModuleWeb(mod) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.