Skip to content

VBPCApy

License: MIT Python 3.11+ Code style: ruff DOI

Variational Bayesian PCA with missing data support.

VBPCApy implements Variational Bayesian Principal Component Analysis (Ilin & Raiko, 2010) with native support for incomplete observations, sparse masks, and posterior uncertainty quantification. It provides a scikit-learn-compatible estimator, missing-aware preprocessing utilities, and empirical model selection for the number of latent components.

Quick install

pip install vbpca-py

Minimal example

import numpy as np
from vbpca_py import VBPCA

x = np.random.randn(200, 50)  # 200 samples x 50 features
model = VBPCA(n_components=5, maxiters=100)
scores = model.fit_transform(x)
recon = model.inverse_transform(scores)

Next steps