Skip to main content

A library for latent variable modeling and dimensionality reduction

Project description

Latents logo

PyPI Version Python Versions License

CI codecov Documentation

Ruff uv Contributor Covenant

Latents: A Python Library for Latent Variable Modeling

[!WARNING] Latents is in an early stage of development and is not yet stable. The API is subject to frequent change.

Latents is a Python library for latent variable modeling and dimensionality reduction, with an emphasis on linear, probabilistic methods. The following methods are currently supported:

  • Group Factor Analysis (GFA)
  • Delayed Latents Across Multiple Groups (mDLAG) — under development

Installation

Requires Python 3.10 or higher.

pip install latents

Quickstart

from latents.callbacks import ProgressCallback
from latents.gfa import GFAFitConfig, GFAModel

# Configure and fit to multi-group observation data Y
config = GFAFitConfig(x_dim_init=10)  # Start with more dims than needed
model = GFAModel(config=config)
model.fit(Y, callbacks=[ProgressCallback()])

# Inspect results
model.flags.display()

# Discovered sparsity pattern: which factors are significant in each group
_, sig_dims, _, _ = model.obs_posterior.compute_dimensionalities()
print(sig_dims.astype(int))

Documentation

See our documentation for the complete API reference, user guide, and tutorials.

Contributing

Interested in contributing? See the Contributing Guide.

Code of Conduct

Please consult the Code of Conduct.

License

MIT

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

latents-0.0.5.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

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

latents-0.0.5-py3-none-any.whl (54.9 kB view details)

Uploaded Python 3

File details

Details for the file latents-0.0.5.tar.gz.

File metadata

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

File hashes

Hashes for latents-0.0.5.tar.gz
Algorithm Hash digest
SHA256 758121c0d333a5ad2fdba792e6e1c505123584681f7e0382abb61dd73b1757bc
MD5 4099519d3eaa85fc6db6f9f5b0a848c5
BLAKE2b-256 2e1025864a8772a562429d29ca5dc17512dbfa0770311118119ff76a72f5e1b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for latents-0.0.5.tar.gz:

Publisher: cd.yml on egokcen/latents

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

File details

Details for the file latents-0.0.5-py3-none-any.whl.

File metadata

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

File hashes

Hashes for latents-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 32353cb1a2aa10c73555184a5d81200c7b8ffd48993da27c02c29e3af735c41d
MD5 e9b16b495ff9f7d71188cb371cc78979
BLAKE2b-256 323b8cd9cc9efb93652b92fe12fd1755644eaeff3776d5e3d872713a6d975ac0

See more details on using hashes here.

Provenance

The following attestation bundles were made for latents-0.0.5-py3-none-any.whl:

Publisher: cd.yml on egokcen/latents

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