FTest<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter.Univariate
F-Test for feature selection in regression problems.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → FTest<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
The F-test asks: “How much of the target’s variation can be explained by this feature compared to random noise?” A high F-value means the feature explains a significant portion of the target variability. It’s used for continuous targets (regression), not classification.
How It Works
The F-test computes the ratio of the variance explained by the relationship between a feature and the target to the unexplained variance. Higher F-statistics indicate features with stronger linear relationships to the target.
Constructors
| Constructor | Summary |
|---|---|
FTest(int nFeaturesToSelect, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> FScores { get; } |
|
Vector<T> PValues { get; } |
|
bool SupportsInverseTransform { 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) |