FloatingSearch<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Wrapper
Sequential Floating Forward Selection (SFFS) for feature selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → FloatingSearch<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Regular forward selection adds features one at a time but never reconsiders its choices. SFFS can “float” - after adding a feature, it checks if any previously added features are now unnecessary and removes them. This leads to better final selections.
How It Works
SFFS is an advanced wrapper method that performs forward selection with conditional backward elimination. After each forward step, it attempts to remove features that may have become redundant.
Constructors
| Constructor | Summary |
|---|---|
FloatingSearch(int nFeaturesToSelect, int maxBacktrack, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> FeatureScores { get; } |
|
bool SupportsInverseTransform { get; } |
|
int MaxBacktrack { 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) |