Repository navigation
v1.4.0 - The reproducibility update
First release on PyPI and Zenodo since 1.3.1. It also carries everything of 1.3.2 to 1.3.4, which were tags only. Several forecasts change (see "Results change"). To reproduce the old results: pip install tam-ml==1.3.1.
DOI of this version: https://doi.org/10.5281/zenodo.23171729 (all versions: https://doi.org/10.5281/zenodo.20543271).
Results change
The figures come from the regression suite of this release (tests/regression/), run on 1.3.1 and on 1.4.0 with the same data and checks: of 335 comparable forecast errors, 296 are identical, 18 better, 21 worse.
AdaptiveTAMequals aStaticTAMrefitted on each window (1.3.4): per-window normalisation, no hidden clip, float64, windows anchored at the start.- Better: the error of a 90-day window refitted every 30 days drops by 73%, every 7 days by 42%; a prediction after a fit by 92%;
grid_search_fitby 49%. - Worse: a 28-day window has too few rows per fit, and its error rises by 51% (every day) and by 56% (with a spline per window). Use a window of 56 days or more.
- Better: the error of a 90-day window refitted every 30 days drops by 73%, every 7 days by 42%; a prediction after a fit by 92%;
KalmanTAMscales causally and updates at every step (1.3.3): between -18% and +6% depending on the settings.- A prediction without the group column gave a meaningless forecast (an error about 5,000 times larger than a normal one) and now gives a normal one (1.3.3).
NeuralTAM[EXP]:- Seeded validation split, shuffling and initialisation: the same fit twice gives the same forecast.
- A network on a feature that also has a closed-form effect replaces that effect, as for the other features (before, the forecast was the closed-form model plus a stray network column). Its backfitting now starts from that effect; it started from zero.
guard=Truekeeps a network only where it beats the closed-form effect on the validation rows. A short training gives theStaticTAMforecast and aUserWarning(in the regression check the forecast error drops by about 46%);guard=Falsekeeps every network. The learning rate is no longer halved while the validation loss is still flat, so networks that train long enough win where they can (about 5% below the static model's error in the check, with 60 epochs).
- Stable modules: the error of
te()with GCV drops by 2% and the mixture mean by 0.6%; the otherStaticTAMeffects, conformal and distributional results are identical. auto_fitdefaultgammastays 1.4 after a re-tuning on the fixed engine.
New in 1.4.0
te()has one smoothing parameter per margin (mgcv semantics).KalmanTAM(process_noise_var={term: q, ...}): one process noise per formula term.NeuralTAM(seed=...),NeuralTAM(guard=True),network_used_, and the three fixes above.compact()onStaticTAM,AdaptiveTAM,KalmanTAMandOperaTAM;AdaptiveTAMfrees its simulation cache after a run, so the size of a compacted model no longer grows with the data.AdaptiveTAMwarns when a forecast level was not in the training rows of its window.- A formula with an empty argument is rejected; predictions and decomposed effects are placed by row position (duplicate index labels, interleaved groups).
OperaTAMandNeuralTAMaccept a frame whose columns are stored in another order than the formula lists them.- The public API signatures are pinned by tests.
- A regression suite in
tests/regression/(38 scripts, a frozen one-year FORCE extract, two committed results files), and aUse casesworkflow that runs every script ofuse_cases/on each push and pull request. - One SPDX header in every source and test file, REUSE annotations and licence texts, contributor files (CODEOWNERS, issue and pull request templates, CONTRIBUTING).
Also in this release (1.3.2 to 1.3.4, tags only)
- 1.3.2: a grouped model predicts a frame that holds only some of its groups; no silent overflow in log-target quantiles.
- 1.3.3:
KalmanTAMscaling and updates (see above);s()predicted wrongly on one-row frames and on a single out-of-range value;KalmanTAM(calibration_steps=...)andtune_hyperparameters(calibration_steps=...);lookback_daysis deprecated. - 1.3.4:
AdaptiveTAMequals a rollingStaticTAM(see above); categorical codes are normalised on the full level range; spline knots come from the training tensor;TAMExtrapolationWarning,ta.rolling_windows(...)andAdaptiveTAM(clip_to_train_range=...)are new.
The full list is in CHANGELOG.md.