TimerOptions<T>
Options & Configuration · AiDotNet.Models.Options
Configuration options for Timer (Generative Pre-Training for Time Series).
Inheritance: ModelOptions → RegressionOptions<T> → TimeSeriesRegressionOptions<T> → TimerOptions<T>
For Beginners
Timer brings GPT-style pre-training to time series:
The Key Insight: Just like GPT learns language by predicting the next token, Timer learns time series patterns by predicting future values. Pre-training on diverse datasets enables strong zero-shot transfer.
How It Works:
- Autoregressive Pre-training: Learn to predict future from past
- Masked Modeling: Learn to reconstruct masked portions
- Multi-scale Processing: Handle different temporal granularities
- Fine-tuning: Adapt to specific domains with minimal data
Architecture:
- Patch-based tokenization (like PatchTST)
- GPT-style decoder transformer
- Autoregressive generation head
- Optional masked modeling objective
Advantages:
- Strong zero-shot and few-shot performance
- Generalizes across domains and frequencies
- Efficient fine-tuning with minimal labeled data
- Handles variable sequence lengths
How It Works
Timer is a generative pre-training approach for time series that uses autoregressive generation combined with masked modeling to learn rich temporal representations from diverse time series datasets.
Reference: Liu et al., “Timer: Generative Pre-Training of Time Series”, 2024.
https://arxiv.org/abs/2402.02368
Constructors
| Constructor | Summary |
|---|---|
TimerOptions() |
Initializes a new instance of the TimerOptions class with default values. |
TimerOptions(TimerOptions<T> other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
FoundationModelSize ModelSize { get; set; } |
Gets or sets the model size variant for Timer-XL. |
bool UseAutoregressiveDecoding { get; set; } |
Gets or sets whether to use autoregressive decoding during generation. |
double DropoutRate { get; set; } |
Gets or sets the dropout rate for regularization. |
double GenerationTemperature { get; set; } |
Gets or sets the temperature for sampling during generation. |
double LearningRate { get; set; } |
Gets or sets the AdamW learning rate for downstream forecasting. |
double LearningRateDecay { get; set; } |
Gets or sets the paper’s per-epoch exponential learning-rate decay. |
double MaskRatio { get; set; } |
Gets or sets the mask ratio for masked modeling pre-training. |
double WeightDecay { get; set; } |
Gets or sets the decoupled weight-decay coefficient. |
int ContextLength { get; set; } |
Gets or sets the context length (input sequence length). |
int ForecastHorizon { get; set; } |
Gets or sets the forecast horizon (prediction length). |
int HiddenDimension { get; set; } |
Gets or sets the hidden dimension size. |
int MaxContextLength { get; set; } |
Gets or sets the maximum context length for Timer-XL. |
int NumHeads { get; set; } |
Gets or sets the number of attention heads. |
int NumLayers { get; set; } |
Gets or sets the number of transformer layers. |
int PatchLength { get; set; } |
Gets or sets the patch length for tokenization. |
int PatchStride { get; set; } |
Gets or sets the patch stride. |