TimesNetOptions<T>

Options & Configuration · AiDotNet.Models.Options

Configuration options for the TimesNet model.

Inheritance: ModelOptions → TimesNetOptions<T>

For Beginners

These options control how the TimesNet model behaves:

Key settings:

  • TopK: How many dominant periods to discover from the data
  • NumLayers: How deep the network is
  • ConvKernelSize: Size of the 2D convolution kernels
  • ModelDimension: Size of internal representations

TimesNet is particularly good at capturing periodic patterns (daily, weekly, seasonal) that are common in financial time series.

How It Works

TimesNet transforms 1D time series into 2D tensors based on discovered periods, then applies 2D convolutions to capture both intra-period and inter-period variations.

Reference: Wu et al., “TimesNet: Temporal 2D-Variation Modeling for General Time Series Analysis”, ICLR 2023. https://arxiv.org/abs/2210.02186

Constructors

Constructor Summary
TimesNetOptions()

Properties

Property Summary
ILossFunction<T> LossFunction { get; set; } Gets or sets the loss function for training.
bool UseInstanceNormalization { get; set; } Gets or sets whether to use instance normalization (RevIN).
double Dropout { get; set; } Gets or sets the dropout rate.
double LearningRate { get; set; } Gets or sets the learning rate.
int ConvKernelSize { get; set; } Gets or sets the 2D convolution kernel size.
int FeedForwardDimension { get; set; } Gets or sets the feedforward network dimension.
int ModelDimension { get; set; } Gets or sets the model dimension (embedding size).
int NumFeatures { get; set; } Gets or sets the number of input features.
int NumLayers { get; set; } Gets or sets the number of TimesBlock layers.
int PredictionHorizon { get; set; } Gets or sets the prediction horizon.
int SequenceLength { get; set; } Gets or sets the input sequence length.
int TopK { get; set; } Gets or sets the number of dominant periods to discover.

Methods

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