ForecastingModelBase<T>

Base Classes · AiDotNet.Finance.Base

Base class for financial forecasting models, adding forecasting-specific behavior on top of the core financial model infrastructure.

Inheritance: NeuralNetworkBase<T> → FinancialModelBase<T> → ForecastingModelBase<T>

Implements: IForecastingModel<T>, IShapeContract

Known derived types: Autoformer<T>, Crossformer<T>, DCRNN<T>, DeepAR<T>, DeepFactor<T>, DeepState<T>, DiffusionTS<T>, ETSformer<T>, FEDformer<T>, GraphWaveNet<T>, Hippo<T>, ITransformer<T>, Informer<T>, LSTNet<T>, LagLlama<T>, MQCNN<T>, MTGNN<T>, Mamba2<T>, Mamba<T>, NBEATSFinance<T>, NHiTSFinance<T>, NonStationaryTransformer<T>, PatchTST<T>, RWKVForecaster<T>, RelationalGCN<T>, S4<T>, STGNN<T>, ScoreGrad<T>, TCN<T>, TFT<T>, TSMixer<T>, TemporalGCN<T>, TimeGPT<T>, TimeLLM<T>, TimeMachine<T>, TimeSeriesFoundationModelBase<T>, TimesNet<T>, UniTS<T>, WaveNet<T>

For Beginners

Think of this as the “forecasting toolkit” that all time series models share. It defines what every forecasting model must expose so the rest of the library can treat them consistently.

How It Works

This base class layers forecasting-specific requirements (like multi-step prediction and instance normalization) on top of the shared financial model base.

Properties

Property Summary
bool IsChannelIndependent { get; }
int PatchSize { get; }
int Stride { get; }

Methods

Method Summary
Dictionary<string, T> Evaluate(Tensor<T> inputs, Tensor<T> targets)
Dictionary<string, Tensor<T>> GetNamedLayerActivations(Tensor<T> input) Walks the layer stack the way this family’s forward passes do: instance-normalize the input and promote a bare rank-1 series to [1, N] before it reaches the first layer.
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) The forecasting family’s output law: [Batch, PredictionHorizon, NumFeatures].
Tensor<T> ApplyInstanceNormalization(Tensor<T> input)
Tensor<T> AutoregressiveForecast(Tensor<T> input, int steps)