Repository navigation
v1.5.0: GLM engine, offsets, transforms, adaptive penalties, distributional refit
Minor release for the non-Gaussian losses and for richer effects. New arguments and options are appended after the existing ones and keep the previous behaviour by default, so existing calls give the same forecasts. The exceptions are fixes: auto_fit() and grid_search_fit() on a non-Gaussian loss now use that loss (they used to score the raw response with an identity link), and phys(x, basis='neural') no longer crashes at fit.
DOI of this version: https://doi.org/10.5281/zenodo.23507593 (all versions: https://doi.org/10.5281/zenodo.20543271).
Non-Gaussian losses
- Fits of
poisson,gamma,binomial,negative_binomialandtweediebuild the design matrix once (about 7 times faster on 30 000 rows, same coefficients). auto_fit()andgrid_search_fit()work on these losses (working-weight GCV, candidates scored on the response scale).tam.evaluation.unit_deviance,deviance_explained(D2) and the deviance metric names accepted by the AutoTAM selectors.AdaptiveTAMover a non-Gaussian base: the windows are GLMs on the link scale with the base forecast as offset, so forecasts keep the support of the family; count and Tweedie quantiles.offset(col): an exposure term with a fixed coefficient of one.target_transform(log,log1p,asinh,logit,boxcox) on a plainStaticTAM, with exact quantile inversion.
Effects and smoothing
c(): levels from the training codes whenn_catis omitted;unseen='edge'|'mean'|'zero'for a code the model never saw (default unchanged);topo='graph'for spatial levels.s(x, m_pen=m)locally adaptive penalty;rbf(kernel='tps')thin-plate spline;te(.., mode='per_level')with one smoothing parameter per level of a factor;l(z, raw=True)for varying-coefficient slopes.n(..., orthogonalize=True)andt(..., orthogonalize=True): the flexible block explains only what the interpretable terms cannot.auto_fit(criterion='reml'): Laplace restricted marginal likelihood with analytic gradient (default stays GCV).- Distributional
StaticTAM:refit_rounds(weighted refit of the location),scale_correction(leverage-corrected scale), and a record of the fit.
Known limits: a graph term needs the coordinates of a region from its training rows (a region without any keeps the zero effect); refit_rounds helps a parsimonious location and changes almost nothing for a flexible one.
The full list is in CHANGELOG.md.