ITimeSeriesFeatureExtractor<T>
Interfaces · AiDotNet.Interfaces
Defines a specialized data transformer for extracting features from time series data.
Implements: IDataTransformer<T, Tensor<T>, Tensor<T>>
Known implementations: TimeSeriesTransformerBase<T>, TimeSeriesTransformerPipeline<T>
For Beginners
Time series data is data collected over time, like:
- Stock prices recorded every minute
- Temperature readings every hour
- Sales figures every day
This interface helps you extract useful features from such data, like:
- Rolling averages (what’s the average of the last 7 days?)
- Lagged values (what was the value 3 days ago?)
- Volatility (how much does the value fluctuate?)
These features help machine learning models understand patterns in time series data.
How It Works
This interface extends the standard data transformer pattern with time series-specific functionality, including auto-detection of optimal parameters, window-based feature extraction, and support for both univariate and multivariate time series.
Properties
| Property | Summary |
|---|---|
bool AutoDetectEnabled { get; } |
Gets whether auto-detection of optimal parameters is enabled. |
bool SupportsIncrementalTransform { get; } |
Gets whether this transformer supports incremental (streaming) transformation. |
int InputFeatureCount { get; } |
Gets the number of input features (columns) expected. |
int OutputFeatureCount { get; } |
Gets the number of output features that will be generated. |
int[] WindowSizes { get; } |
Gets the window sizes used for rolling calculations. |
string[] FeatureNames { get; } |
Gets the names of features that will be generated. |
Methods
| Method | Summary |
|---|---|
IncrementalState<T> GetIncrementalState() |
Gets the current state of the incremental buffer for inspection or serialization. |
List<string> GetValidationErrors(Tensor<T> data) |
Gets validation errors for the input data. |
T[] TransformIncremental(T[] newDataPoint) |
Transforms a single new data point incrementally, maintaining internal state. |
bool ValidateInput(Tensor<T> data) |
Validates that the input data meets the requirements for this transformer. |
int[] DetectOptimalWindowSizes(Tensor<T> data) |
Detects optimal window sizes based on the data’s characteristics. |
void InitializeIncremental(Tensor<T> historicalData) |
Initializes the incremental state from historical data. |
void SetIncrementalState(IncrementalState<T> state) |
Restores the incremental state from a previously saved state. |