Skip to content

Repository files navigation

LANfactory

DOI PyPI PyPI downloads Run tests codecov License: MIT

LANfactory trains likelihood approximation networks (LANs), choice probability networks (CPNs), and option probability networks (OPNs) with PyTorch or JAX/Flax. It exports concrete-shape ONNX artifacts for use as likelihoods in HSSM.

Documentation · Start with the PyTorch tutorial · API reference · HSSM ecosystem map

Install

pip install lanfactory

Optional integrations are available through the mlflow, hf, sbi, and bayesflow extras, or together through lanfactory[all]. The documentation is the canonical source for training, export, configuration, and sharing guidance.

Contributor bootstrap

Install the development environment and run the package gates:

uv sync --all-groups
uv run pytest tests/
uv run ruff check src/lanfactory
uv run ruff format --check .

Build or serve the documentation through the repository-owned entry point:

./scripts/docs.sh build
./scripts/docs.sh serve

Notebook execution remains a separate package test workflow; the documentation build renders the committed notebook outputs without executing them.

Citation

Use the archived LANfactory release DOI: 10.5281/zenodo.17137303.

About

Package to Train LANs (Likelihood approximation networks)

Resources

Stars

16 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages