Repository navigation
v1.4.1: quantile forecasts and count distributions
Patch release for probabilistic forecasting: new methods and options only, plus one fix. Existing calls give the same forecasts; the only change of behaviour is that a distributional or mixture StaticTAM with the default log target now raises on a training target with values <= 0 instead of returning a meaningless model.
DOI of this version: https://doi.org/10.5281/zenodo.23248249 (all versions: https://doi.org/10.5281/zenodo.20543271).
Fixed
- Log target with values
<= 0: a distributional or mixtureStaticTAMwith the default log target raises aValueErrornaming the count anddist_kwargs={"log_target": False}. Such values were clipped to 1e-12 before the log, which turned them into huge negative outliers: the fitted scale collapsed to 1e-10 or exploded to 1e60. Positive targets are unchanged.
Quantile forecasts
AdaptiveTAM.predict_quantiles(data, taus): the scale of a distributional base is renewed online from the standardized residuals of the last window, past residuals only.KalmanTAM.predict_quantiles(data, taus): Gaussian quantiles from the predictive variance of the filter, also for a multi-step horizon.SafetyTAM.predict_quantiles(y_pred, levels, signed=...): conformal quantiles at several levels, with a signed per-tail calibration for skewed errors;calibrate(..., verbose=False)silences the sample-count line.OperaTAM(..., loss_type='pinball', tau=...)andtam.model.opera.aggregate_quantiles: online aggregation of quantile forecasts (MLpol and EWA).
All of them return a DataFrame with q<tau> columns, like the distributional StaticTAM.
Distributions
dist_kwargs={"target_transform": "asinh" | "logit"}for the distributionalStaticTAM: skewed targets with negative values (prices) and targets bounded in an interval, with exact back-transformed quantiles."log"stays the default.loss="negative_binomial"andloss="tweedie"(log link): overdispersed counts, and positive targets with exact zeros. The dispersion is estimated (model.dispersion_);predict_quantilesgives discrete quantiles for counts (also forpoisson) and the quantiles of the compound Poisson-gamma law for Tweedie, never below zero.f(x, ..., period=None | 'auto' | (low, high)): the range of one cycle of a Fourier input (hours 0-23, days 0-6, months 1-12, or a history that covers part of the cycle). The default is unchanged.
Also
- Limiting the CPU threads through
OMP_NUM_THREADSandMKL_NUM_THREADSis documented and tested. A hang aftertorch.set_num_threads(n)seen on one PyTorch / oneMKL build also occurs withouttam; the results oftamare unchanged. - A
DCOsign-off is required on pull requests, and aREUSEcheck runs in CI.
Known limits: with a distributional base, the columns of AdaptiveTAM.predict_online carry the internal name __mu__; the Kalman variance after a long gap of missing targets is understated (inherited from the filter).
The full list is in CHANGELOG.md.