Deep Bayesian unsupervised decoder networks. Use poisson or multinomial belief networks to cluster count data.
Project description
Deep Bayesian unsupervised clustering
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
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.
Source Distribution
Built Distribution
File details
Details for the file mubelnet-1.0.0.tar.gz
.
File metadata
- Download URL: mubelnet-1.0.0.tar.gz
- Upload date:
- Size: 37.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80e04a4bde8d9f9939d223f3d0fd66dd89433b1d289cfa585fa5de7652517ae2 |
|
MD5 | 3556203a329a4c5b04625dcc82b1873a |
|
BLAKE2b-256 | 651b58bcfadab9ced9ba2bda8789e741e5edc1101aa5158b8c83c21f7b826454 |
File details
Details for the file mubelnet-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: mubelnet-1.0.0-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34034042cf63f4653f94c3034f26497c2225728040b50b9ed03524623c9c2187 |
|
MD5 | b1ea947d79a3105b4280270f4c2b8383 |
|
BLAKE2b-256 | d380964b1d6f228410ca89e7abdec89833582d81345d0e283797f8444f27ba49 |