LagFeatureSelector<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.TimeSeries
Lag-based Feature Selection for Time Series.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ LagFeatureSelector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
In time series, past values often predict future values. This selector finds features whose past values (lags) are strongly correlated with the target, helping you identify which features are most useful for forecasting.
How It Works
Selects features based on their lagged correlations with the target, identifying features that have predictive power at different time lags.
Constructors
| Constructor | Summary |
|---|---|
LagFeatureSelector(int nFeaturesToSelect, int maxLag, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> BestLagCorrelations { get; } |
|
bool SupportsInverseTransform { get; } |
|
int MaxLag { get; } |
|
int NFeaturesToSelect { get; } |
|
int[] BestLags { get; } |
|
int[] SelectedIndices { get; } |
Methods
| Method | Summary |
|---|---|
Matrix<T> FitTransform(Matrix<T> data, Vector<T> target) |
|
bool[] GetSupportMask() |
|
string[] GetFeatureNamesOut(string[] inputFeatureNames) |
|
void Fit(Matrix<T> data, Vector<T> target) |