Skip to main content

SuperGLM

CI codecov Python 3.12+

Penalised GLMs and GAM-style pricing models for insurance. SuperGLM combines explicit feature specs, exact REML, large-n discrete REML, solver-backed monotone splines, actuarial validation tooling, and deployable fitted estimators for Poisson, Gamma, NB2, Tweedie, Binomial, Gaussian, and Gaussian or Gamma location–scale models.

Install

pip install superglm

Interactive Plotly charts are optional: pip install "superglm[plotting]". The browser model editor is included.

Fit a pricing model

from superglm import Categorical, Numeric, Spline, SuperGLM

features = {
    "DrivAge": Spline(kind="ps", k=14, knot_strategy="quantile_rows"),
    "VehAge": Spline(kind="cr", k=10, knot_strategy="quantile_rows"),
    "BonusMalus": Spline(kind="cr", k=12, knot_strategy="quantile_tempered"),
    "Area": Categorical(base="most_exposed"),
    "LogDensity": Numeric(),
}
model = SuperGLM(family="poisson", features=features)
model.fit_reml(train_df, y_train, sample_weight=exposure_train)
print(model.summary())

REML chooses the smoothness of every spline. Monotone and curvature constraints are enforced inside the fit. SuperLSS fits location, scale and shape parameters together for severity and distributional work.

Documentation

Licence

MIT. Free for everyone, commercial use included.

Metadata

Release files for superglm 0.35.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 superglm 0.35.0
File Size Uploaded
superglm-0.35.0.tar.gz 1.8 MB Details

Built distribution (wheel)

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

Total release size: 3.9 MB

Release files / superglm-0.35.0.tar.gz

Download URL superglm-0.35.0.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
12b3b07402ddcb4f1f7ddf900e46b75744bc85b2a2255deb0b6fcc3972a938d8
BLAKE2b-256 checksum
How to use checksums
a74a4959b5b6a0c57e5eac1f05cd79943d9368de5a835fe92f8587855b3de872
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 23, 2026.

Transparency log

Release files / superglm-0.35.0-py3-none-any.whl

Download URL superglm-0.35.0-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1e7edc8f954aa1be5e2a230accb81f1542836c8f520c2d185f0f770a5ac167cf
BLAKE2b-256 checksum
How to use checksums
ee215e8a386ff4e6216c58f5c81fffcc648fc92a5083ed14b657004f1823efb6
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 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.35.0 This release

2 release files

0.34.0

2 release files

0.33.0

2 release files

0.32.0

2 release files

0.30.0

2 release files

0.29.1

2 release files

0.29.0

2 release files

0.28.0

2 release files

0.27.0

2 release files

0.26.0

2 release files

0.25.0

2 release files

0.17.0

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

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