RandomizedSearch<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Wrapper

Randomized Search for feature selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Instead of trying every combination (too slow) or being systematic (might miss good solutions), this method randomly samples feature combinations. It’s like randomly picking lottery numbers - given enough tries, you’ll likely find something good.

How It Works

Randomized Search evaluates random subsets of features to find good combinations. It’s faster than exhaustive search and can handle larger feature spaces while still exploring diverse solutions.

Constructors

Constructor Summary
RandomizedSearch(int nFeaturesToSelect, int nIterations, int? randomState, int[] columnIndices)

Properties

Property Summary
T BestScore { get; }
Vector<T> FeatureScores { get; }
bool SupportsInverseTransform { get; }
int NFeaturesToSelect { get; }
int NIterations { 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)