Matlab package for Sparse and modular Networks with Overlapping Communities (SNetOC)
- Version: v1.1
- Last modified: 2020-01-24
- URL: https://github.com/OxCSML-BayesNP/SNetOC
This Matlab package implements algorithms for simulation and posterior inference with the class of sparse graph models with overlapping community structure introduced by Todeschini, Miscouridou and Caron (2017). It allows to simulate graphs with a given level of sparsity and a fixed number of communities. It also performs inference of the network parameters (level of affiliation of each node to each community) and hyperparameters (sparsity of the network).
The package has been tested on Matlab R2016a, R2017a and R2017b and requires the Statistics Toolbox.
A. Todeschini, X. Miscouridou, F. Caron, Exchangeable Random Measures for Sparse and Modular Graphs with Overlapping Communities. arXiv:1602.02114. To appear in Journal of the Royal Statistical Society: Series B Download paper.
- Download the zip file
- Unzip it in some folder
- Run the test file
test.m
In order to use the package, the folders 'GGP'
, 'CGGP'
and 'utils'
need
to be added to the Matlab path, using the command addpath
(see the test file).
test.m
: checks that the basic functions are running without error
Demos and reproducible results of the article Todeschini, Miscouridou and Caron (2017)
demo_sparsity.m
: shows empirically the sparsity properties of a range of graph models. [html version]
You can run multiple MCMC chains in parallel by calling the parpool
command
before running the following scripts. This requires the Parallel Computing Toolbox.
demo_simulations.m
: posterior inference on a simulated graph under the CCRM model. [html version]demo_polblogs.m
: posterior inference on the polblogs graph under the CCRM model. [html version]demo_usairport.m
: posterior inference on the USairport graph under the CCRM model. [html version]demo_overlappingcommunity.m
: posterior inference on the polblogs graph under the CCRM model using the wrapper functionoverlapping_community_detection
. [html version]MMSB_polblogs.m
: posterior inference on the polblogs graph the mixed membership stochastic blockmodel.MMSB_usairport.m
: posterior inference on the USairport graph the mixed membership stochastic blockmodel.MMSB_simulations.m
: posterior inference on a simulated graph under the mixed membership stochastic blockmodel.
overlapping_community_detection
: Wrapper function; takes a graph as input and returns the level of affiliation of each node to different communitiesgraphmodel
: creates a graph model objectgraphrnd
: samples a graphgraphmcmc
: creates a MCMC objectgraphmcmcsamples
: runs a MCMC algorithm for posterior inference on graphsgraphest
: returns point estimates of the graph parameters
v1.1 (2020-01-24)
- Some fixes
- Updated demo scripts
v1.0 (2017-11-16)
- First release of the package.
SNetOC
is Copyright (c) 2016-2020 A. Todeschini ([email protected]), X. Miscouridou ([email protected]) and F. Caron ([email protected]).
All Rights Reserved.
See the file LICENSE.txt
.
utils/munkres.m
is Copyright (c) 2009, Yi Cao.
All rights reserved.
See the file utils/munkres_license.txt
.