Skip to main content

bpca

Tests Integration Tests codecov Documentation

Bayesian Principal Component Analysis

Getting started

BPCA follows the standard scikit-learn syntax

from bpca import BPCA
from sklearn.datasets import load_iris

iris_dataset = load_iris()
X = iris_dataset["data"]

# Fit + Extract information
bpca = BPCA(n_components=2)
usage = bpca.fit_transform(X)
loadings = bpca.components_
explained_variance_ratio = bpca.explained_variance_ratio_

Please refer to the documentation, in particular, the API documentation.

Installation

You need to have Python 3.11 or newer installed on your system.

  1. Install the latest release of bpca from PyPI:
pip install bpca
  1. Or Install the latest development version:
pip install git+https://github.com/lucas-diedrich/bpca.git@main

Release notes

See the Release Notes.

Contact

For questions and help requests, you can reach out in the scverse discourse. If you found a bug, please use the issue tracker.

Citation

This package implements the algorithm proposed by Oba, 2003 and is built on the reference implementation by Stacklies et al, 2008 Please cite the original authors

Oba, S. et al. A Bayesian missing value estimation method for gene expression profile data. Bioinformatics 19, 2088 - 2096 (2003).

Stacklies, W., Redestig, H., Scholz, M., Walther, D. & Selbig, J. pcaMethods—a bioconductor package providing PCA methods for incomplete data. Bioinformatics 23, 1164 - 1167 (2007).

Generative model proposed by Bishop, 1998:

Bishop, C. Bayesian PCA. in Advances in Neural Information Processing Systems vol. 11 (MIT Press, 1998).

If you find this implementation useful, consider giving it a star on GitHub and cite this implementation

Diedrich, L. bpca [Computer software]. https://github.com/lucas-diedrich/bpca.git

Metadata

Release files for bpca 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bpca 0.1.0
File Size Uploaded
bpca-0.1.0.tar.gz 196.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bpca 0.1.0
File Interpreter ABI Platform
bpca-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 219.3 kB

Release files / bpca-0.1.0.tar.gz

Download URL bpca-0.1.0.tar.gz
Size 196.7 kB
Tags Source
SHA-256 checksum
How to use checksums
406b625304370471f00894a1ec57b864763db42745f5bd3a4b9a0584a66998a5
BLAKE2b-256 checksum
How to use checksums
c7bfc558d7a94f04d9fa57f58b33e9b190f764f86be2fe5df3f4e496d6ac17ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 15, 2026.

Transparency log

Release files / bpca-0.1.0-py3-none-any.whl

Download URL bpca-0.1.0-py3-none-any.whl
Size 22.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79daf648464bed3456546bc65190c1c722cd461e3a17a19e6f27b4243cb305a0
BLAKE2b-256 checksum
How to use checksums
0fba0372dad86d2236d4ec4e8f66d7a452ebaa4fde3515e1ac65fb055443cb61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page