AutoformerConfig
chronax.models.autoformer.AutoformerConfig
Hyperparameters for :class:AutoformerModel.
__init__(self, h=24, input_size=72, hidden_size=128, n_heads=4, factor=3, moving_avg_window=25, encoder_layers=2, decoder_layers=1, conv_hidden_size=32, decoder_input_size_multiplier=0.5, dropout=0.05, activation='gelu')
| Parameter | Type | Default | Description |
|---|---|---|---|
h |
int |
24 |
Forecast horizon. |
input_size |
int |
72 |
Context window length fed to the encoder. |
hidden_size |
int |
128 |
Embedding / attention hidden dimension. |
n_heads |
int |
4 |
Number of auto-correlation heads (must divide hidden_size). |
factor |
int |
3 |
Auto-correlation top-k factor (top_k = factor * log(L)). |
moving_avg_window |
int |
25 |
Kernel size for the trend moving-average filter. |
encoder_layers |
int |
2 |
Number of stacked encoder layers. |
decoder_layers |
int |
1 |
Number of stacked decoder layers. |
conv_hidden_size |
int |
32 |
Hidden channels for the position-wise FFN convolutions. |
decoder_input_size_multiplier |
float |
0.5 |
Fraction of input_size used as the decoder start-token ("label") length; must be in (0, 1). |
dropout |
float |
0.05 |
Dropout rate applied throughout (training only). |
activation |
str |
"gelu" |
FFN nonlinearity — "relu" or "gelu". |
AutoformerModel
chronax.models.autoformer.AutoformerModel · inherits flax.linen.Module
Univariate Autoformer forecaster built with flax.linen. Forward pass: [B, input_size, 1] -> [B, h, 1].
__init__(self, config)
| Parameter | Type | Default | Description |
|---|---|---|---|
config |
AutoformerConfig |
- | (undocumented) |
__call__(self, insample_y, deterministic=True) -> jnp.ndarray
(The forward pass of the model.)
| Parameter | Type | Default | Description |
|---|---|---|---|
insample_y |
jnp.ndarray |
- | (undocumented) |
deterministic |
bool |
True |
(undocumented) |
Returns: jnp.ndarray (The forecast output, shape [B, h, 1]).