TiDEConfig
chronax.models.TiDEConfig
Hyperparameters for :class:TiDE.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
h |
int |
24 |
Forecast horizon. |
input_size |
int |
48 |
History window length L. |
hidden_size |
int |
512 |
MLP hidden width for encoder/decoder blocks. |
decoder_output_dim |
int |
32 |
Per-step output dimension of the dense decoder. |
temporal_decoder_dim |
int |
128 |
Hidden size of the temporal decoder MLP block. |
dropout |
float |
0.3 |
Dropout rate (0 = disabled). |
layernorm |
bool |
True |
Insert LayerNorm after each MLPResidual block output. |
num_encoder_layers |
int |
1 |
Number of stacked MLPResidual encoder layers. |
num_decoder_layers |
int |
1 |
Number of stacked MLPResidual decoder layers. |
temporal_width |
int |
4 |
Projected feature dimension for temporal covariates. |
futr_exog_size |
int |
0 |
Number of future exogenous features F. |
hist_exog_size |
int |
0 |
Number of historic exogenous features X. |
stat_exog_size |
int |
0 |
Number of static exogenous features S. |
output_size |
int |
1 |
Outputs per step — 1 for point forecasts. |
MLPResidual
chronax.models.MLPResidual · inherits flax.linen.Module
MLP with skip connection and optional LayerNorm.
Mirrors NeuralForecast's MLPResidual exactly:
h = relu(Dense(hidden_size)(x))
h = Dense(output_dim)(h)
h = Dropout(h)
out = h + Dense(output_dim)(x) # skip
if use_layernorm: out = LayerNorm(out)
Operates on the last axis, so both [B, D] and [B, T, D] inputs are handled correctly without reshaping.
__init__(self, hidden_size, output_dim, dropout_rate=0.0, use_layernorm=True)
| Parameter | Type | Default | Description |
|---|---|---|---|
hidden_size |
int |
- | (undocumented) |
output_dim |
int |
- | (undocumented) |
dropout_rate |
float |
0.0 |
(undocumented) |
use_layernorm |
bool |
True |
(undocumented) |
__call__(self, x, deterministic=True) -> jnp.ndarray
| Parameter | Type | Default | Description |
|---|---|---|---|
x |
jnp.ndarray |
- | (undocumented) |
deterministic |
bool |
True |
(undocumented) |
Returns: jnp.ndarray (undocumented)
TiDE
chronax.models.TiDE · inherits flax.linen.Module
Time-series Dense Encoder (TiDE).
Input insample_y is expected as [B, L, 1] (consistent with the rest of Chronax). The trailing feature dim is squeezed inside the forward pass before concatenating covariates and running the encoder stack.
__init__(self, config)
| Parameter | Type | Default | Description |
|---|---|---|---|
config |
TiDEConfig |
- | :class:TiDEConfig specifying the full architecture. |
__call__(self, insample_y, hist_exog=None, futr_exog=None, stat_exog=None, deterministic=True) -> jnp.ndarray
| Parameter | Type | Default | Description |
|---|---|---|---|
insample_y |
jnp.ndarray |
- | [B, L, 1] (undocumented) |
hist_exog |
Optional[jnp.ndarray] |
None |
[B, L, X] (undocumented) |
futr_exog |
Optional[jnp.ndarray] |
None |
[B, L+h, F] (undocumented) |
stat_exog |
Optional[jnp.ndarray] |
None |
[B, S] (undocumented) |
deterministic |
bool |
True |
(undocumented) |
Returns: jnp.ndarray ([B, h, output_size])