SuperGLM
Penalised GLMs and GAM-style pricing models for insurance, with exact and discrete REML, solver-backed monotone splines, out-of-fold validation, and deployable fitted estimators.
Start Here¶
If you are new to the package, the intended path is:
- build an explicit feature spec
- fit with
fit_reml()andselection_penalty=0 - use
cross_validate(..., fit_mode="fit_reml")for model comparison - validate challengers with Lorenz and double-lift charts
- serialize the fitted estimator for scoring
What It Covers¶
Workflow-first pricing models
Exact REML for standard GAM-style pricing, discrete REML for large data, and clear guidance on when to use sparse selection instead.
Feature engineering in-model
P-splines, cubic regression splines, natural splines, ordered categoricals, grouped categoricals, and interaction terms.
Monotone solvers
Solver-backed monotone spline fitting through QP and SCOP paths, with post-fit repair retained only as a fallback.
Validation and deployment
Cross-validation with out-of-fold predictions, Lorenz and double-lift charts, diagnostics, and deployable fitted estimators.
Example Plots¶
Poisson frequency model on French MTPL2 (678k policies), fitted with REML smoothness selection. Plots show pointwise confidence bands, weighted density, and interior knot positions.
Vehicle Age (quantile_rows knots) |
Bonus-Malus (quantile_tempered, alpha=0.2) |
|---|---|
![]() |
![]() |

