Skip to main content

Azoic

A scikit-learn-compatible Python toolkit for non-life technical tariff (pure premium) modelling: actuarial preprocessing, GLM (glum) + GBM (LightGBM), frequency-severity decomposition, actuarial diagnostics, reproducible runs, GBM-to-GLM distillation, and multiplicative tariff export.

Install

Requires Python 3.12 or newer. In your own uv project:

uv add azoic==0.5.0
uv run azoic --help

For development or the executable tutorial, clone this repository and run:

uv sync --no-dev                    # runtime only
uv sync                             # default development environment
uv sync --all-extras --all-groups   # everything

Correctness conventions

Frequency models use claim_count / exposure with sample_weight=exposure. deviance_test is exposure-weighted mean Tweedie deviance with fixed power=1.5. Gini is a concentration Gini for ranking; equal prediction scores are evaluated as tied blocks.

Temporal holdouts never split equal timestamps. Tuning selects parameters on an inner split of the outer training partition, then refits on outer training data and reports the untouched outer test. Exported tariffs reject unknown categorical levels and non-finite numeric inputs.

Positive-objective GBMs can be exported through azoic export-tariff --distill; the workbook reproduces the distilled GLM student, not the teacher.

Executable tutorial series

The numbered Quarto book under examples/ runs the complete technical-tariff workflow on pinned OpenML data and then covers tuning, temporal stability, protected-group audit, and manual tariff recipes. Install the Jupyter kernel plus the MLflow, Plotly, and tuning extras; install Quarto separately and ensure its quarto executable is on PATH.

uv sync --group demo --extra mlops --extra plot --extra tune
just demo

The render produces the ignored book under examples/_book/; fetched data, the tariff workbook, reports, and local MLflow files stay under the ignored examples/_artifacts/. To inspect the recorded run afterward:

uv run mlflow ui \
  --backend-store-uri sqlite:///examples/_artifacts/fremtpl2/mlflow.db

Dev

just check          # ruff + ty + pytest
just test           # pytest -x
just lint
just format
uv run ty check     # production source types

Metadata

Release files for azoic 0.5.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 azoic 0.5.0
File Size Uploaded
azoic-0.5.0.tar.gz 54.6 kB Details

Built distribution (wheel)

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

Total release size: 114.8 kB

Release files / azoic-0.5.0.tar.gz

Download URL azoic-0.5.0.tar.gz
Size 54.6 kB
Tags Source
SHA-256 checksum
How to use checksums
153cfc4af228e11b4813e5a22a2215fad8a966194a895d13dfdedafbc0d74a9b
BLAKE2b-256 checksum
How to use checksums
3f724d1f449c0216b8c80f9fe640dba6572dc879f6578e9c0a8353cbfdd10ec3
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 Oct 17, 2026.

Transparency log

Release files / azoic-0.5.0-py3-none-any.whl

Download URL azoic-0.5.0-py3-none-any.whl
Size 60.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66627cfb139d1acacee5e288f92b08246a9f2e44342d144cb1a6082614afd92b
BLAKE2b-256 checksum
How to use checksums
edc4ad7b98360268207e2015cc0cfaf2489b33e1f905f71b9e8b2f1f2037b3a5
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 Oct 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

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