TimeSeriesTransformerBase<T>

Base Classes · AiDotNet.Preprocessing.TimeSeries

Abstract base class for all time series feature extractors providing shared functionality.

Implements: ITimeSeriesFeatureExtractor<T>

Known derived types: AnomalyFeaturesTransformer<T>, DifferencingTransformer<T>, LagLeadTransformer<T>, RollingCorrelationTransformer<T>, RollingRegressionTransformer<T>, RollingStatsTransformer<T>, RollingVolatilityTransformer<T>, SeasonalityTransformer<T>, TechnicalIndicatorsTransformer<T>

For Beginners

This base class handles the common tasks that all time series transformers need, so each specific transformer can focus on its unique calculations.

Features provided:

  • NaN padding at the start where we don’t have enough history
  • Fast parallel processing for large datasets
  • Automatic detection of optimal window sizes
  • Consistent naming of output features

How It Works

This class provides common functionality for time series transformers including:

  • Window validation and edge handling
  • Parallel processing for large datasets
  • Auto-detection of optimal window sizes
  • Feature naming conventions

Properties

Property Summary
bool AutoDetectEnabled { get; }
bool IsFitted { get; set; }
bool SupportsIncrementalTransform { get; }
bool SupportsInverseTransform { get; }
int InputFeatureCount { get; }
int OutputFeatureCount { get; }
int[] ColumnIndices { get; }
int[] WindowSizes { get; }
string[] FeatureNames { get; }

Methods

Method Summary
IncrementalState<T> GetIncrementalState()
List<string> GetValidationErrors(Tensor<T> data)
T[] TransformIncremental(T[] newDataPoint)
Tensor<T> FitTransform(Tensor<T> data)
Tensor<T> InverseTransform(Tensor<T> data)
Tensor<T> Transform(Tensor<T> data)
TransformerState<T> ExportState() Exports the transformer’s state for serialization.
bool ValidateInput(Tensor<T> data)
int[] DetectOptimalWindowSizes(Tensor<T> data)
string[] GetFeatureNamesOut(string[] inputFeatureNames)
void Fit(Tensor<T> data)
void ImportState(TransformerState<T> state) Imports a previously exported state to restore the transformer.
void InitializeIncremental(Tensor<T> historicalData)
void SetIncrementalState(IncrementalState<T> state)