Graph sampling algorithms from Rubinov (2016) Constraints and spandrels of interareal connectomes. Nature Communications 7 13812. See the matlab files for detailed help and contact Mika Rubinov (rubinovm at janelia.hhmi.org) for additional questions or suggestions.
simann_constraint_model.m: Constrained randomization of empirical networks | mleme_constraint_model.m: Exact maximum-likelihood estimation of maximum-entropy/exponential random-graph models | |
---|---|---|
Type of sampling | Uniform sampling of networks with hard constraints: the constraints are satisfied with high accuracy for each individual sampled network. | Unbiased sampling of networks with soft constraints: the constraints are satisfied on average for the network ensemble, but not, in general, for each individual network. |
Method of sampling | Specification of constraint-error function, and sampling of individual networks via numerical minimization (with simulated annealing) of this function. | Maximum-likelihood estimation of network probability distribution by numerical solution of systems of nonlinear equations, and sampling of individual networks directly from this distribution. |
Type of constraints | Weighted and binary node-strength, module-weight, and wiring-cost constraints. In addition, all empirical connection weights are automatically preserved. | Weighted node-strength and module-weight constraints. Empirical connection weights are not preserved. |
Accuracy | A small normalized constraint error. | Constraint errors are guaranteed to vanish in the limit of the full network ensemble. |
Disadvantages | Uniform sampling is possible but not formally guaranteed. | Sampled distributions may not be representative of target distributions. |
Implementation | mex file called from a matlab wrapper (the mex file needs to be compiled once before execution). | Native matlab implementation (requires the optimization toolbox). |