Skip to main content

Bayesian Principal Component Analysis

Project description

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

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

bpca-0.0.2.tar.gz (195.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bpca-0.0.2-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file bpca-0.0.2.tar.gz.

File metadata

  • Download URL: bpca-0.0.2.tar.gz
  • Upload date:
  • Size: 195.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bpca-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d127ade897fd9d5c7e8ab35a694c23b0bc4e3a6a23d7578847282f011e4e8ecf
MD5 56f91c7ed077f4fb1594ee061d889be1
BLAKE2b-256 62ad8cc99525b95751a594f4177e33b22b1621324d9399839a5448f13f279f21

See more details on using hashes here.

Provenance

The following attestation bundles were made for bpca-0.0.2.tar.gz:

Publisher: release.yaml on lucas-diedrich/bpca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bpca-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: bpca-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bpca-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4e627aaa0d31fe13ef4f1b5dfd28c117fe6ee3e4a1edcb7c0087c9179025f4e
MD5 05cd6a18a892110ac069b06ba2927f78
BLAKE2b-256 007ef71e71f8b93297099151d0c4bbaf19b87a7d7cb1aee4f46f7a7dc90bc5dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for bpca-0.0.2-py3-none-any.whl:

Publisher: release.yaml on lucas-diedrich/bpca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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