FEDformerOptions<T>
Options & Configuration · AiDotNet.Models.Options
Configuration options for the FEDformer (Frequency Enhanced Decomposed Transformer) model.
Inheritance: ModelOptions → FEDformerOptions<T>
For Beginners
FEDformer is like listening to music - instead of processing each sound wave individually (time domain), it analyzes the frequencies (like bass and treble). This makes it much faster while still capturing important patterns.
Key innovations:
- Frequency Attention: Computes attention in frequency domain (O(n) vs O(n²))
- Decomposition: Separates trend (overall direction) from seasonal (repeating patterns)
- Random Selection: Randomly samples frequencies for efficiency
Default values are from the original FEDformer paper and work well for most datasets.
How It Works
FEDformer achieves linear complexity by performing attention in the frequency domain using Fourier or Wavelet transforms. It also uses seasonal-trend decomposition for better interpretability.
Reference: Zhou et al., “FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting”,
ICML 2022. https://arxiv.org/abs/2201.12740
Constructors
| Constructor | Summary |
|---|---|
FEDformerOptions() |
Creates a new instance with default values. |
FEDformerOptions(FEDformerOptions<T> other) |
Creates a copy of the specified options. |
Properties
| Property | Summary |
|---|---|
FourierModeSelection ModeSelection { get; set; } |
Gets or sets how the frequency modes are chosen. |
FrequencyAttentionType AttentionType { get; set; } |
Gets or sets the frequency attention type. |
ILossFunction<T> LossFunction { get; set; } |
Gets or sets the loss function for training. |
bool UseInstanceNormalization { get; set; } |
Gets or sets whether to wrap the network in instance normalization (RevIN, Kim et al. |
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 dimension. |
int LabelLength { get; set; } |
Gets or sets the label length (overlap between input and prediction). |
int ModeSelectionSeed { get; set; } |
Gets or sets the seed of the random mode selection. |
int ModelDimension { get; set; } |
Gets or sets the model dimension. |
int MovingAverageKernel { get; set; } |
Gets or sets the moving average kernel size for trend extraction. |
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 NumModes { get; set; } |
Gets or sets the number of frequency modes to keep. |
int PredictionHorizon { get; set; } |
Gets or sets the prediction horizon. |
int SequenceLength { get; set; } |
Gets or sets the input sequence length (lookback window). |
Methods
| Method | Summary |
|---|---|
List<string> Validate() |
Validates the options and returns any validation errors. |