Skip to main content

Deep Bayesian unsupervised decoder networks. Use poisson or multinomial belief networks to cluster count data.

Project description

Deep Bayesian unsupervised clustering

multinomial belief network This repository contains deep Bayesian unsupervised clustering models. In particular, the multinomial belief network [1] and Zhou–Cong–Chen's 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.

params, trace = sample_markov_chain(
    jax.random.key(42),
    kernel=kernel,
    n_samples=100,
    n_chains=2,
    n_burnin_steps=100,
)

Documentation

Reference docs can be found on: https://hylkedonker.gitlab.io/mubelnet.

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.

Meta-mutational signatures

You can browse the meta-mutational signatures (based on COSMIC v3.3) ]and their tri-nucleotide spectra in the meta-signature overview.

Download

The weights of the meta-signatures and the hyperparameters are available in comma-separated format:

References

[1] Donker et al. "Multinomial belief networks for healthcare data", Proceedings of Machine Learning Research 25:1–22, 2024 (2024).

[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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mubelnet-1.0.0.tar.gz (37.1 MB view hashes)

Uploaded Source

Built Distribution

mubelnet-1.0.0-py3-none-any.whl (34.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page