build_windows
tft_training.build_windows
Rolling windows [n_windows, input_size+h] of y (step 1).
| Parameter | Type | Default | Description |
|---|---|---|---|
y |
jnp.ndarray |
- | (undocumented) |
input_size |
int |
- | (undocumented) |
h |
int |
- | (undocumented) |
build_exog_windows
tft_training.build_exog_windows
Rolling windows of an exog array [T, F].
span="input" -> [n, input_size, F] (encoder window); span="full" ->
[n, input_size+h, F] (future-known spanning input + horizon).
| Parameter | Type | Default | Description |
|---|---|---|---|
arr |
jnp.ndarray |
- | (undocumented) |
input_size |
int |
- | (undocumented) |
h |
int |
- | (undocumented) |
n_windows |
int |
- | (undocumented) |
span |
str |
- | (undocumented) |
train
tft_training.train
Train net in place via one nnx.scan. Returns per-step losses.
| Parameter | Type | Default | Description |
|---|---|---|---|
net |
- | - | (undocumented) |
y |
- | - | (undocumented) |
h |
- | - | (undocumented) |
input_size |
- | - | (undocumented) |
max_steps |
- | - | (undocumented) |
windows_batch_size |
- | - | (undocumented) |
lr |
- | - | (undocumented) |
seed |
- | - | (undocumented) |
loss_fn |
- | - | (undocumented) |
scaler |
- | - | (undocumented) |
hist_exog |
- | None |
(undocumented) |
futr_exog |
- | None |
(undocumented) |
stat_exog |
- | None |
(undocumented) |
predict_step
tft_training.predict_step
Forecast next h steps from the final input_size of the series.
Returns [h, multiplier] in the original scale. futr_full is the
[input_size+h, F] future-known window (history + horizon); hist_context
is the [input_size, H] encoder window; stat is [S].
| Parameter | Type | Default | Description |
|---|---|---|---|
net |
- | - | (undocumented) |
y_context |
- | - | (undocumented) |
h |
- | - | (undocumented) |
input_size |
- | - | (undocumented) |
scaler |
- | - | (undocumented) |
hist_context |
- | None |
(undocumented) |
futr_full |
- | None |
(undocumented) |
stat |
- | None |
(undocumented) |