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.37.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 superglm 0.37.1
File Size Uploaded
superglm-0.37.1.tar.gz 2.3 MB Details

Built distribution (wheel)

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

Total release size: 5.0 MB

Release files / superglm-0.37.1.tar.gz

Download URL superglm-0.37.1.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
74efbfe256d60f39ae0ffbcd58b50aa4931efc02fc90fc7c2adc85e033a079ec
BLAKE2b-256 checksum
How to use checksums
e8c533ff4cab2ebe1855419f7f16bdbe3ae519a63bbeab37184f8afc79474ef9
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 7, 2026.

Transparency log

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

Download URL superglm-0.37.1-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9ca3a45627d146eb8f17b95e11632400ad7e6fe8ee3f14f2173820cce5565f06
BLAKE2b-256 checksum
How to use checksums
6f48e8e4e54e75eebfeac2c67b54aa47c9253b6200a42a99c7899c681992ef7d
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 7, 2026.

Transparency log
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