Skip to main content

aimz: Scalable probabilistic impact modeling

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Run Pytest PyPI Conda Python License: Apache 2.0 Code style: ruff codecov JOSS DOI

Installation | User Guide | Examples | FAQs | Changelog

Overview

aimz is a Python library for scalable probabilistic impact modeling: estimating how interventions affect outcomes while quantifying uncertainty.

It provides a high-level, object-oriented interface on top of NumPyro and JAX for building, fitting, and scaling Bayesian models: a user-defined NumPyro model is wrapped as a "kernel" inside a single class, augmented with capabilities for scalable predictive sampling, structured outputs, and experiment tracking.

Key capabilities

  • Object-oriented interface for NumPyro models: Bring any NumPyro model as a "kernel" and access fit, predict, sample, and related methods through a single class; aimz does not enforce a fixed architecture.
  • Scalable predictive sampling: JIT-compiled, sharded sampling streams results to chunked Zarr stores (or accumulates them in memory), enabling large-scale posterior predictive simulations that do not need to fit in memory.
  • Structured outputs: Predictions, samples, and effect estimates are materialized as Xarray objects backed by Zarr or host memory, integrating cleanly with the scientific Python ecosystem.
  • Intervention handling and impact modeling: Specify interventions declaratively and estimate effects from posterior predictive distributions.
  • Experiment tracking: MLflow integration for logging runs, parameters, metrics, and model artifacts with full lineage.

Installation

Install aimz using either pip or conda:

pip install -U aimz
conda install -c conda-forge aimz

For additional details, see the full installation guide.

Quick start

from aimz import ImpactModel


# Define a probabilistic model (kernel) using NumPyro primitives
def model(X, y=None): ...


# Load or prepare data
X, y = ...

# Initialize ImpactModel with SVI or MCMC inference
im = ImpactModel(
    model,
    rng_key=...,  # e.g., jax.random.key(0)
    inference=...,  # e.g., SVI (or MCMC)
)

# Fit model with minibatch SVI and draw posterior samples
im.fit(X, y, batch_size=32, epochs=10)

# Generate posterior predictive samples
dt = im.predict(X)

# Estimate the effect of fixing the sample site "treatment" to 1.0
dt_intervention = im.predict(X, intervention={"treatment": 1.0})
effect = im.estimate_effect(dt, dt_intervention)

Contributing

See the Contributing Guide to get started.

Citation

If you use aimz in your work, please cite the accompanying paper in the Journal of Open Source Software:

@article{Kim2026,
  title        = {aimz: Scalable probabilistic impact modeling},
  author       = {Kim, Eunseop},
  year         = 2026,
  journal      = {Journal of Open Source Software},
  publisher    = {The Open Journal},
  volume       = 11,
  number       = 120,
  pages        = 9738,
  doi          = {10.21105/joss.09738},
  url          = {https://doi.org/10.21105/joss.09738}
}

Metadata

Release files for aimz 0.16.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 aimz 0.16.0
File Size Uploaded
aimz-0.16.0.tar.gz 105.4 kB Details

Built distribution (wheel)

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

Total release size: 191.4 kB

Release files / aimz-0.16.0.tar.gz

Download URL aimz-0.16.0.tar.gz
Size 105.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b32239ff24971b24fe80fc595157586d09e39a2e2988b894808b2eb867342287
BLAKE2b-256 checksum
How to use checksums
32f7ff6fafe03ca0917a30ae968b4b8c18ece64765a83749c3606b73162ce4a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 27, 2026.

Transparency log

Release files / aimz-0.16.0-py3-none-any.whl

Download URL aimz-0.16.0-py3-none-any.whl
Size 86.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e0d88c0b47b6d66b1195303781e537d7d13a26338c656c9bfc8af1a091d5f8f
BLAKE2b-256 checksum
How to use checksums
747d198c6500004ff7215ea08d4625c9e95a7918154878761971ca7e6c4afd32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.16.0 This release

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

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