ExhaustiveSearch<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Wrapper

Exhaustive Search Feature Selection (for small feature sets).

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → ExhaustiveSearch<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

This is like trying every possible combination of ingredients to find the perfect recipe. It’s guaranteed to find the best answer, but becomes impractical with many features because the number of combinations grows exponentially (2^n for n features).

How It Works

Exhaustive search evaluates all possible feature subsets to find the optimal combination. This guarantees finding the best subset but is only feasible for small numbers of features (typically less than 20).

Constructors

Constructor Summary
ExhaustiveSearch(int nFeaturesToSelect, int maxFeaturesForExhaustive, int[] columnIndices)

Properties

Property Summary
T BestScore { 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)