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.34.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| superglm-0.34.0.tar.gz | 1.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| superglm-0.34.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.9 MB
Release files / superglm-0.34.0.tar.gz
| Download URL | superglm-0.34.0.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c385b96c999807c81dd47011a11841f72646f8ffeec22c89a91ea564d87f875e
|
|
BLAKE2b-256 checksum How to use checksums |
aaed949606917130cd05047b0787fa223ed0f984b7653d4e318179acf8f22574
|
| 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 15, 2026.
Transparency logRelease files / superglm-0.34.0-py3-none-any.whl
| Download URL | superglm-0.34.0-py3-none-any.whl |
|---|---|
| Size | 2.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59d9be0b4030861ce65373c822e83675bf9ad6e0ecdf357d0cb258f2642862d2
|
|
BLAKE2b-256 checksum How to use checksums |
3c0fe991b0c9f179513d62bed8788cc3e433373f9b2ca78313cacd57a23ce587
|
| 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 15, 2026.
Transparency log