Skip to main content

t-boost

An oblivious gradient-boosting machine that is exactly decomposable into functional-ANOVA (fANOVA) "rating tables" of up to 8th order.

Every tree is a symmetric (oblivious) tree with one shared (feature, threshold) test per level and a bounded number of distinct raw features; deeper levels may reuse a feature to refine a surface rather than add a new one, so the trained ensemble truncates at a fixed interaction order. That structure lets the fitted model be rewritten, losslessly, as a set of main-effect and interaction tables (with factored box representations for high-order effects) that reproduce the model's predictions with mathematical exactness within floating-point tolerance — a glass-box GBM you can read, ship as lookup tables, or audit.

  • Rust core (t-boost-core), thin PyO3 bindings, and polars-native Python estimators. The core is #![forbid(unsafe_code)], no-panic-gated, and deterministic (bit-identical across thread counts).
  • polars-native: TBoostRegressor / TBoostClassifier take polars DataFrames and LazyFrames directly, with targets, weights and exposure named by column.
  • Objectives: squared_error, logistic (binary), native-softmax multiclass, and the log-link poisson / gamma / tweedie families for insurance frequency & severity.
  • Exact decomposition: model.tables(X) emits the fANOVA rating tables; the reconstruction is verified against the ensemble by lossless invariant checks. Tables are purified against the exposure-weighted marginals by default (ref_measure="exposure"); tables(X, ref_measure="joint") re-expresses the same model under each pair's joint exposure via regularized pairwise reallocation with explicit ridge regularization and residual diagnostics for correlated factors, and actual_vs_expected(X, y, exposure=...) gives the A/E by rating-factor level a reviewer asks for first (explicit exposure/weight arguments are required for reliable row alignment). Neither changes a prediction.

Install

uv add t-boost

Wheels are built for Linux / macOS / Windows as a single abi3 wheel per platform (CPython 3.10–3.13).

From source

Building from source needs a Rust toolchain (rustup); uv drives the maturin build:

uv sync                          # builds the Rust extension into the project's .venv

Quickstart

polars DataFrames and LazyFrames are the estimators' first-class frame type — no pandas anywhere. y / sample_weight / exposure / groups may name columns of X (which are then excluded from the features), String/Categorical/Enum columns are target-statistic encoded automatically, and prediction matches feature columns by name, ignoring extras:

import polars as pl
from t_boost import TBoostClassifier, TBoostRegressor

train = pl.read_parquet("policies.parquet")            # or pl.scan_parquet(...) for lazy input

# Claim frequency: Poisson with an exposure offset
freq = TBoostRegressor(objective="poisson").fit(
    train.select(FEATURES + ["ClaimCount", "Exposure"]),
    "ClaimCount",                                      # y, by column name
    exposure="Exposure",                               # per-row offset, by column name
)
rate = freq.predict(test)                              # extra columns ignored, any column order

# Classification: binary, or native softmax for K >= 3 classes
clf = TBoostClassifier().fit(train.select(FEATURES + ["Lapsed"]), "Lapsed")
proba = clf.predict_proba(test)                        # (n, K), rows sum to 1

The exact decomposition

import json
tables = json.loads(freq.tables(train))     # fANOVA rating tables (JSON)

Each fitted model decomposes into main effects and interactions that reproduce the raw score with mathematical exactness within floating-point tolerance (for a multiclass model, one table bank per class logit).

Objectives

Objective Task Link
squared_error regression identity
logistic binary classification logit
softmax (automatic for TBoostClassifier with ≥3 classes) multiclass softmax
poisson counts / frequency log
gamma positive severities log
tweedie compound Poisson-gamma log

License

Apache-2.0

Metadata

Release files for t-boost 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for t-boost 0.6.1
File Size Uploaded
t_boost-0.6.1.tar.gz 956.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for t-boost 0.6.1
File
t_boost-0.6.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
t_boost-0.6.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
t_boost-0.6.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
t_boost-0.6.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
t_boost-0.6.1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 13.3 MB

Release files / t_boost-0.6.1.tar.gz

Download URL t_boost-0.6.1.tar.gz
Size 956.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1d39766bc21481196d8d348d2fc869be2193f1852004da2bbada6345b26ce318
BLAKE2b-256 checksum
How to use checksums
dde4b3a4f26017d53569b67674fff469c948365307ae8f3be0e6f54c3e7f0f4b
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 2, 2026.

Transparency log

Release files / t_boost-0.6.1-cp310-abi3-win_amd64.whl

Download URL t_boost-0.6.1-cp310-abi3-win_amd64.whl
Size 2.5 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
42d09214fcc7e0cdedd5fe5eb26c24f1aacb6096e9856af3d5e78691fdbe4cc3
BLAKE2b-256 checksum
How to use checksums
7cf9445dcd2658981d05ddb7f9e9d365f4687589a8b8c4b52c64a3acdd79d588
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 2, 2026.

Transparency log

Release files / t_boost-0.6.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL t_boost-0.6.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.6 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
fcf4b0b72dd1dca59fdd8cdc2f2bf23876fea219fd0b992b60abe76224f3013c
BLAKE2b-256 checksum
How to use checksums
5aa813e264f564d294caa8dd818461e752331e37e13213fd4a30dea8cbca8b32
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 2, 2026.

Transparency log

Release files / t_boost-0.6.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL t_boost-0.6.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.4 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
85dc689c74e47c4335d7e1ac6d89cd8cf6d3c8cecabb362c270f03df6ea8a540
BLAKE2b-256 checksum
How to use checksums
9a7a3cab978205f6f3a484a42ce59d5c80e62279d86463f975ac7cdf63ade8a5
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 2, 2026.

Transparency log

Release files / t_boost-0.6.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL t_boost-0.6.1-cp310-abi3-macosx_11_0_arm64.whl
Size 2.4 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cfb03171f0b53b87235237a73b86aa01a9cf1eb5d5aaacbe5b16a5e1144b3be6
BLAKE2b-256 checksum
How to use checksums
ec36435e029b7d6a24614b5e824687bc6ce8030fae613421c1a4b656836672a4
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 2, 2026.

Transparency log

Release files / t_boost-0.6.1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL t_boost-0.6.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 2.5 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2ecde2ed171b83648d43ecf4db75448e081d73b51cccb0cf31b8ddb7399e9577
BLAKE2b-256 checksum
How to use checksums
8c9d7bd41488dfa597e6d53a68da9d8b120f04e06f7d36233e4b8cf74ff0485d
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 2, 2026.

Transparency log

Release history Release notifications | RSS feed

0.8.1

6 release files

0.8.0

6 release files

0.7.0

6 release files

0.6.2

6 release files

This release

0.6.1 This release

6 release files

0.6.0

5 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