Implementation of Markov Chain Bayesian Clustering techniques, including DPM and MFM, with an abstract Mixture Model and Component Model API.


License
MIT
Install
pip install bmcc==1.0.3

Documentation

Bayesian Markov Chain Monte Carlo Clustering

Implementation of Markov Chain Monte Carlo Bayesian Clustering techniques, including DPM (Dirichlet Process Mixture Models; Neal, 2000) and MFM (Mixture of Finite Mixtures; Miller & Harrison, 2018)) mixture models, with an abstract Mixture Model and Component Model API.

Both Gibbs samplers Neal, 2000, Split Merge samplers Jain & Neal, 2012 are implemented.

Hyperparameter updates for DPM are (optionally) implemented using an Empirical Bayes update procedure (McAuliffe et. al., 2006).

Final configuration selection is implemented using Least Squares clustering (Dahl, 2006).

[Wiki / Documentation] [References]

Installation

Python

bmcc is on PyPI (the Python Package Index):

pip install bmcc

(or pip3 install bmcc, depending on your environment.)

NOTE: Only Python 3 is supported. Python 2 may not work.

R

First, make sure Python 3 is installed, and install with pip install bmcc as per above. Then, install the R package with

library(devtools)
install_github("https://github.com/thetianshuhuang/bmcc_r")

To use, load the package bmcc. You will also need to load reticulate in order to deal with type conversions.

library(bmcc)
library(reticulate)

See the wiki page for more details.

Usage

See the wiki for documentation and usage instructions.

Three examples are available.