This repository implements data structures to represent Dirichlet processes and hierarchical Dirichlet processes (see hdp.h for an overview of these concepts). In addition, this repository provides a Markov chain Monte Carlo sampler to perform inference in mcmc.h.
To use the code, simply download the files into a folder named "hdp". Add this folder to the include path for the compiler, for example by using the
This library depends on core and math. The code makes use of
C++11 and is regularly tested with
gcc 8 but I have previously compiled it with
clang 4.0, and
Microsoft Visual C++ 14.0 (2015). The code is intended to be platform-independent, so please create an issue if there are any compilation bugs.