Deep Bayesian unsupervised decoder networks. Use poisson or multinomial belief networks to cluster non-negative count data.
Project description
Deep Bayesian unsupervised clustering
This repository contains deep Bayesian unsupervised clustering models. In particular, the multinomial belief network [1] and the Zhou-Cong-Chen Poisson gamma belief network [2].
Installation
You can pip install this package by running:
pip3 install mubelnet
Quick start guide
Let's create a two-layer multinomial belief network (like in the figure) with one and two hidden units, respectively. The kernel function, that advances the Markov chain by a single (Gibbs) step looks as follows:
import haiku as hk
import jax
from mubelnet.nets import MultinomialBelief
from mubelnet.mcmc import sample_markov_chain
# Set up training data.
X_train = ...
n_features = X_train.shape[1]
@hk.transform_with_state
def kernel():
"""Advance Markov chain of belief net by one step."""
n_hidden_units = (1, 2)
model = MultinomialBelief(n_hidden_units, n_features)
model(X_train) # Do one Gibbs sampling step.
states = sample_markov_chain(
jax.random.key(42),
kernel=kernel,
n_samples=100,
n_chains=2,
n_burnin_steps=100,
)
Example handwritten digits
A more complete example, that shows how to train a network on the UCI ML hand-written digits datasets, see the digits jupyter notebook.
Download meta-mutational signatures
The weights of the meta-signatures (based on COSMIC v3.3) and the hyperparameters can be downloaded in comma-separated format here:
Package documentation
Reference documentation can be found on: https://hylkedonker.gitlab.io/mubelnet.
References
[1] Donker, Neijzen, Lunter, "Multinomial belief networks", arXiv:2311.16909 (2023).
[2]: Zhou, Cong, Chen. "Augmentable gamma belief networks.", J. Mach. Learn. Res. 17.1, 5656-5699 (2016).
License
The code open sourced under the MIT license (see LICENSE.txt).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.