NonStationaryTransformerOptions<T>

Options & Configuration · AiDotNet.Models.Options

Configuration options for the Non-stationary Transformer model.

Inheritance: ModelOptions → NonStationaryTransformerOptions<T>

For Beginners

These options control how the Non-stationary Transformer model behaves:

Key settings:

  • NumEncoderLayers: How many encoding layers to use for pattern extraction
  • NumDecoderLayers: How many decoding layers for generating forecasts
  • NumHeads: Number of attention heads for multi-head attention
  • UseDeStat: Whether to use De-stationary Attention mechanism

Time series data often has changing statistical properties (non-stationarity). This model explicitly handles this by:

  1. Normalizing the data to be stationary for better attention
  2. De-normalizing attention outputs to preserve original data characteristics

How It Works

Non-stationary Transformer addresses the over-stationarization problem in time series forecasting by proposing Series Stationarization and De-stationary Attention mechanisms.

Reference: Liu et al., “Non-stationary Transformers: Exploring the Stationarity in Time Series Forecasting”, NeurIPS 2022. https://arxiv.org/abs/2205.14415

Constructors

Constructor Summary
NonStationaryTransformerOptions()

Properties

Property Summary
ILossFunction<T> LossFunction { get; set; } Gets or sets the loss function for training.
bool UseDeStationaryAttention { get; set; } Gets or sets whether to use De-stationary Attention.
bool UseInstanceNormalization { get; set; } Gets or sets whether to use instance normalization (RevIN).
bool UseSeriesStationarization { get; set; } Gets or sets whether to use Series Stationarization.
double Dropout { get; set; } Gets or sets the dropout rate.
double LearningRate { get; set; } Gets or sets the learning rate.
int FeedForwardDimension { get; set; } Gets or sets the feedforward network dimension.
int LabelLength { get; set; } Gets or sets the label length (decoder input overlap).
int ModelDimension { get; set; } Gets or sets the model dimension (embedding size).
int NumDecoderLayers { get; set; } Gets or sets the number of decoder layers.
int NumEncoderLayers { get; set; } Gets or sets the number of encoder layers.
int NumFeatures { get; set; } Gets or sets the number of input features.
int NumHeads { get; set; } Gets or sets the number of attention heads.
int PredictionHorizon { get; set; } Gets or sets the prediction horizon.
int ProjectionDimension { get; set; } Gets or sets the number of projection dimensions for stationarization.
int SequenceLength { get; set; } Gets or sets the input sequence length.

Methods

Method Summary
List<string> Validate() Validates the options and returns any validation errors.