Skip to content

OxCSML-BayesNP/SNetOC

 
 

Repository files navigation

SNetOC

Matlab package for Sparse and modular Networks with Overlapping Communities (SNetOC)

Download the package

Description

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.

Reference

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.

Installation

  1. Download the zip file
  2. Unzip it in some folder
  3. 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).

Contents

Test script

  • 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 function overlapping_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.

Main functions: simulation and posterior inference on graphs

  • overlapping_community_detection: Wrapper function; takes a graph as input and returns the level of affiliation of each node to different communities
  • graphmodel: creates a graph model object
  • graphrnd: samples a graph
  • graphmcmc: creates a MCMC object
  • graphmcmcsamples: runs a MCMC algorithm for posterior inference on graphs
  • graphest: returns point estimates of the graph parameters

Changes

v1.1 (2020-01-24)

  • Some fixes
  • Updated demo scripts

v1.0 (2017-11-16)

  • First release of the package.

Copyright

SNetOC is Copyright (c) 2016-2020 A. Todeschini (adrien.todeschini@gmail.com), X. Miscouridou (xenia.miscouridou@spc.ox.ac.uk) and F. Caron (caron@stats.ox.ac.uk). 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.


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • MATLAB 97.4%
  • C++ 2.6%