A library that implements parallel sampling of decomposable (chordal) graphical models. Currently supported functionalities include:
- Bayesian structure learning for discrete log-linear and Gaussian data.
This package currently requires Python 2.7. If graphviz is not installed, you can install it from brew / aptitude / pacman for example
$ brew install graphviz
On Linux system (i.e. Ubuntu/Debian) you might need to run
$ apt install python-dev graphviz libgraphviz-dev pkg-config
Then run
$ pip install parallelDG
It is also possible to pull parallelDG as a docker image by
$ docker pull hallawalla/paralleldg
See the Jupyter notebooks (and .py's) in examples/.
To approximate the underlying decomposable graph posterior given the dataset sample_data/data_ar1-5.csv run
$ parallelDG_ggm_sample -M 10000 -R 100 -f sample_data/data_ar1-5.csv
this will produce a file containing the Markov chain generated by the sample model In order to analyze the chain run
$ analyze_graph_tajectories
this will produce a bunch of files in the current directory to be analyzed.
The data set examples/data/czech_autoworkers.csv contains six binary variables. To generate a MCMC trajectories of decomposable graphs type
$ parallelDG_loglinear_sample -M 10000 -R 100 -f sample_data/czech_autoworkers.csv
and
$ analyze_graph_tajectories
this will produce a number of files in the current directory.
- ** Mohamad Elmasri**. For any questions email me at {first}.{last} at utoronto dot ca.
This project is licensed under the Apache 2.0 License - see the LICENSE file for details
- Felix L. Rios