DeepAROptions<T>

Options & Configuration · AiDotNet.Models.Options

Configuration options for the DeepAR (Deep Autoregressive) model.

Inheritance: ModelOptions → RegressionOptions<T> → TimeSeriesRegressionOptions<T> → DeepAROptions<T>

For Beginners

DeepAR is an advanced forecasting model that not only predicts what will happen, but also how confident it is in those predictions. Instead of saying “sales will be exactly 100 units,” it might say “sales will likely be between 80 and 120 units, with 100 being most probable.”

This is especially useful when:

  • You need to plan for worst-case and best-case scenarios
  • You have many related time series (e.g., sales across many stores)
  • You have some series with very little historical data

The “autoregressive” part means it uses its own predictions as inputs for future predictions, and “deep” refers to the use of deep neural networks (specifically, LSTM networks).

How It Works

DeepAR is a probabilistic forecasting methodology based on autoregressive recurrent neural networks. Unlike traditional methods that provide point forecasts, DeepAR produces probabilistic forecasts that include prediction intervals. It’s particularly effective for:

  • Handling multiple related time series simultaneously
  • Cold-start problems (forecasting for new items with limited history)
  • Capturing complex seasonal patterns and trends
  • Quantifying forecast uncertainty

Constructors

Constructor Summary
DeepAROptions() Initializes a new instance of the DeepAROptions class.
DeepAROptions(DeepAROptions<T> other) Initializes a new instance by copying from another instance.

Properties

Property Summary
DeepARScaleHandling ScaleHandling { get; set; } Gets or sets how the conditioning range is rescaled before the recurrent trunk sees it.
bool UseAgeFeature { get; set; } Gets or sets whether the time-series model adds the paper’s “age” covariate, the distance to the series’ first observation, standardized (§3.4: used in all experiments).
double DropoutRate { get; set; } Gets or sets the dropout between LSTM layers (the paper is silent; GluonTS’s default 0.1).
double LearningRate { get; set; } Gets or sets the Adam learning rate (Table 3: 1e-3).
int BatchSize { get; set; } Gets or sets the batch size (Table 3: 64).
int CovariateSize { get; set; } Gets or sets the number of covariates per step (the time-series model reads them from the input matrix; the paper standardizes every covariate).
int EmbeddingDimension { get; set; } Gets or sets the size of the learned item embedding when several series are modelled together (§3.4: a categorical item feature with a learned embedding; Table 3: 20 on the larger datasets).
int Epochs { get; set; } Gets or sets the number of training epochs over all windows.
int ForecastHorizon { get; set; } Gets or sets the prediction range, the number of steps forecast by ancestral sampling (the paper’s decoder length, 8 to 52 per dataset).
int HiddenSize { get; set; } Gets or sets the number of cells per LSTM layer (the paper’s Table 3: 40, or 120 on the large datasets).
int LookbackWindow { get; set; } Gets or sets the conditioning range t₀: the number of past steps that set the scale and the state before a forecast (the paper’s encoder length, which it sets per dataset: 8 to 168).
int NumLayers { get; set; } Gets or sets the number of LSTM layers (Table 3: 3).
int NumSamples { get; set; } Gets or sets the number of ancestral sample paths a forecast draws (the paper’s appendix: 200).
string LikelihoodType { get; set; } Gets or sets the likelihood: “Gaussian” (real-valued data) or “NegativeBinomial” (counts), the paper’s two, or “StudentT” (heavy tails; the GluonTS reference’s default, its degrees of freedom learned).

Methods

Method Summary
DeepARLikelihood ResolveLikelihood() The likelihood named by LikelihoodType.