Skill Tracer
Skills › Scientific Agent Skills › timesfm-forecasting › output_and_config.md

output_and_config.md

41 lines · skills/timesfm-forecasting/references/output_and_config.md at 5f2bc03

Open on GitHub
1# Output and configuration (2.5 model, package 3.0.2)
2
3With `return_backcast=False`, `forecast()` returns `(B,H)` point and `(B,H,10)`
4quantile arrays. Index 0 is a separately trained mean; indices 1..9 correspond
5to q10..q90. The point is q50 at index 5. The model does not return q05/q95 or
6q99 in this interface. Nine quantiles are not a full predictive distribution.
7
8| Band | Slice indices | Nominal coverage |
9| --- | --- | --- |
10| q10-q90 | 1, 9 | 80% |
11| q20-q80 | 2, 8 | 60% |
12| q50 | 5 | median, equals point |
14A 90% central interval would need q05/q95, not a relabeled decile pair.
15Calibration must be evaluated for the data, origin and horizon of interest.
16Pointwise nominal coverage does not give simultaneous coverage over a trajectory.
18`ForecastConfig` is a frozen dataclass; these are its actual fields:
20| Field | Default | Effect |
21| --- | --- | --- |
22| `max_context` | 0 | Set positive; left padding / last-window truncation, rounded to 32 |
23| `max_horizon` | 0 | Set positive; rounded to 128; requested H must not exceed it |
24| `normalize_inputs` | False | Optional extra normalization for numerical scale; compare on held-out data |
25| `window_size` | 0 | Reserved/unimplemented; leave at 0 |
26| `per_core_batch_size` | 1 | Start at 1 and measure before raising |
27| `use_continuous_quantile_head` | False | Separate quantile-spread head; supports <=1,024 rounded horizon |
28| `force_flip_invariance` | True | Symmetric positive/negative input averaging; increases compute |
29| `infer_is_positive` | True | If entire input is nonnegative, clips outputs at zero; domain decision |
30| `fix_quantile_crossing` | False | Enforces ordering about the median; does not calibrate coverage |
31| `return_backcast` | False | Prepends context backcast; required by XReg |
33`quantiles` and `decode_index` belong to the checkpoint definition, **not**
34ForecastConfig. Fields such as `stride`, `d_model`, `seed`, `dtype` and
35`input_patch_len` are not ForecastConfig arguments. The old diagram showed
36unsupported arguments and must not be used as an API reference.
38Check all outputs for finite values and shape, test `point == q[...,5]`, and
39check `np.diff(q[...,1:], axis=-1) >= 0`. Exclude index 0 from that ordering test.
40With backcasts enabled, slice future positions before evaluating accuracy.
41TimesFM 3.0 has no mean slot; its median is index 4, see `timesfm3.md`.

Output and configuration (2.5 model, package 3.0.2)

With return_backcast=False, forecast() returns (B,H) point and (B,H,10) quantile arrays. Index 0 is a separately trained mean; indices 1..9 correspond to q10..q90. The point is q50 at index 5. The model does not return q05/q95 or q99 in this interface. Nine quantiles are not a full predictive distribution.

BandSlice indicesNominal coverage
q10-q901, 980%
q20-q802, 860%
q505median, equals point

A 90% central interval would need q05/q95, not a relabeled decile pair. Calibration must be evaluated for the data, origin and horizon of interest. Pointwise nominal coverage does not give simultaneous coverage over a trajectory.

ForecastConfig is a frozen dataclass; these are its actual fields:

FieldDefaultEffect
max_context0Set positive; left padding / last-window truncation, rounded to 32
max_horizon0Set positive; rounded to 128; requested H must not exceed it
normalize_inputsFalseOptional extra normalization for numerical scale; compare on held-out data
window_size0Reserved/unimplemented; leave at 0
per_core_batch_size1Start at 1 and measure before raising
use_continuous_quantile_headFalseSeparate quantile-spread head; supports <=1,024 rounded horizon
force_flip_invarianceTrueSymmetric positive/negative input averaging; increases compute
infer_is_positiveTrueIf entire input is nonnegative, clips outputs at zero; domain decision
fix_quantile_crossingFalseEnforces ordering about the median; does not calibrate coverage
return_backcastFalsePrepends context backcast; required by XReg

quantiles and decode_index belong to the checkpoint definition, not ForecastConfig. Fields such as stride, d_model, seed, dtype and input_patch_len are not ForecastConfig arguments. The old diagram showed unsupported arguments and must not be used as an API reference.

Check all outputs for finite values and shape, test point == q[...,5], and check np.diff(q[...,1:], axis=-1) >= 0. Exclude index 0 from that ordering test. With backcasts enabled, slice future positions before evaluating accuracy. TimesFM 3.0 has no mean slot; its median is index 4, see timesfm3.md.

Raw lines 1 to 41