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 and draw posterior samples
im.fit(X, y)

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

# Estimate intervention effects
dt_baseline = im.predict(X)
dt_intervention = im.predict(X, intervention={"treatment": 1.0})
effect = im.estimate_effect(dt_baseline, 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}
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aimz-0.15.0.tar.gz (95.0 kB view details)

Uploaded Source

Built Distribution

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

aimz-0.15.0-py3-none-any.whl (79.5 kB view details)

Uploaded Python 3

File details

Details for the file aimz-0.15.0.tar.gz.

File metadata

  • Download URL: aimz-0.15.0.tar.gz
  • Upload date:
  • Size: 95.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aimz-0.15.0.tar.gz
Algorithm Hash digest
SHA256 48643313cdf83486d62601cd60acee3f6d9f58d9cfa1211e1dd8ccf70321cf06
MD5 da785f4f37c4e7fb0eab1659f9e6f721
BLAKE2b-256 e278b47ad4396b2c7829acaa8dd0b472bc35a80c45608dba38adab4df84b81d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for aimz-0.15.0.tar.gz:

Publisher: publish.yaml on markean/aimz

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

File details

Details for the file aimz-0.15.0-py3-none-any.whl.

File metadata

  • Download URL: aimz-0.15.0-py3-none-any.whl
  • Upload date:
  • Size: 79.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aimz-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1accd65fcd97ef87fd8cdde1c8ad01058148dbd49fb9ccb073cde6ee0defe2a
MD5 31ca3af531868dafbc4e2e689e529519
BLAKE2b-256 bfb8db269a8ebffa0ba9b8024d9e368ed219d5b780fbf843a74b4f622c210298

See more details on using hashes here.

Provenance

The following attestation bundles were made for aimz-0.15.0-py3-none-any.whl:

Publisher: publish.yaml on markean/aimz

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

Release history Release notifications | RSS feed

This release

0.15.0 This release

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.1

2 files

0.9.0

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 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