Matlab package: BNPgraph
Sparse graphs using exchangeable random measures
Download the package
This Matlab package implements algorithms for
simulation and posterior inference with the class of sparse graph models introduced by Caron and Fox (2014).
It allows to simulate graphs with a given level of sparsity,to infer
the parameters of observed networks (sociability parameters associated
to nodes) and to assess the sparsity of a given network.
The package has been tested on Matlab
R2014a and requires the statistics toolbox.
F. Caron, E.B. Fox. Sparse graphs using exchangeable random measures. arXiv:1401.1137. Download paper.
- Download the zip file
- Unzip it in some folder
- Run the test file test.m
order to use the package, the folders "GGP" and "utils" need to be
added to the Matlab path, using the command addpath (see the test file).
of the package
Main functions: simulation and posterior inference on graphs
- demo_graph.m: simulates a GGP graph and runs a MCMC algorithm for posterior inference on that graph [html version]
- demo_bipgraph.m: simulates a GGP bipartite graph and runs a MCMC algorithm for posterior inference on that graph [html version]
- demo_sparse.m: simulates graphs from various models and different sizes to empirically show their sparsity properties [html version]
simulates GGP graphs with different values of the parameter sigma
and shows the associated empirical degree distributions[ html version]
- demo_experiments.m: performs posterior inference on the yeast protein interaction network [html version]
Other samplers of interest:
- 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
- GGPrnd: samples from a generalized gamma process
- GGPsumrnd: samples from the distribution of the sum of the weights in a generalized gamma process
- etstablernd: samples from an exponentially tilted stable distribution
Last update: 01-05-2015. First version of the package.
(C) Copyright 2015 François
Caron,University of Oxford
is granted for anyone to copy, use, or modify these programs and
accompanying documents for purposes of research or education, provided
this copyright notice is retained, and note is made of any changes that
have been made.
These programs and documents are distributed without any warranty, express or implied.
the programs were written for research purposes only, they have not
been tested to the degree that would be advisable in any important
All use of these programs is entirely at the user's own risk.