GrangerCausalitySelector<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.TimeSeries
Granger Causality-based Feature Selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → GrangerCausalitySelector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Granger causality asks: does knowing a feature’s past values help predict the target better than just knowing the target’s own past? Features that “Granger-cause” the target have genuine predictive value for forecasting.
How It Works
Uses Granger causality tests to select features that help predict the target beyond what the target’s own history can predict.
Constructors
| Constructor | Summary |
|---|---|
GrangerCausalitySelector(int nFeaturesToSelect, int maxLag, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> GrangerFScores { get; } |
|
bool SupportsInverseTransform { get; } |
|
int MaxLag { get; } |
|
int NFeaturesToSelect { 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) |