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.0

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

Built distributions (wheels)

Table of built distributions (wheels) for t-boost 0.6.0
File
t_boost-0.6.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
t_boost-0.6.0-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.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
t_boost-0.6.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
t_boost-0.6.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 12.4 MB

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

Download URL t_boost-0.6.0-cp310-abi3-win_amd64.whl
Size 2.5 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
51f401f07a885b070f506990a881c0f4f7fc28757a4c015c2afceb9ebc2d128d
BLAKE2b-256 checksum
How to use checksums
24f72999b9337e0bcbe62b47b363c6963c0ee1ecb84bdabcdb235ddf5370e03e
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.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL t_boost-0.6.0-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
76e76f28be0f122c11ade8c7db20ba73e525876e6f0032f829612dea42197e7c
BLAKE2b-256 checksum
How to use checksums
31d1a142f590f27976a14db8e4f7126b20ee92d3fee8b998f85313cd70e03e37
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.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL t_boost-0.6.0-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
7f09b6a0228bb66b5f0c8a9c19621b97d6a90b6af89d1a8cb55bcfc5d36bb3f4
BLAKE2b-256 checksum
How to use checksums
c43e09b2088676aecf6318dd5cd674fc42ae90f0e382e509596dd21daf55137b
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.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL t_boost-0.6.0-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
d745bcdff20ef6c4ce0563cd3c4a04373bfa3627a7fa898d48c60177f0ba0226
BLAKE2b-256 checksum
How to use checksums
f33b5e3ddf6e22bd2987aa046acdea8e0efd2ed505cab92ddae6398dac384aa3
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.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL t_boost-0.6.0-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
3106fab55577dc444db807d8fee475f2e1d0a985f56a7d46b90b774aa1d3f2cb
BLAKE2b-256 checksum
How to use checksums
b2d8fbc11510650e92e21662b92f06c1205190414dcc697055d9ba2b26c8a080
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

0.6.1

6 release files

This release

0.6.0 This release

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