BidirectionalSearch<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Wrapper
Bidirectional Feature Search for feature selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ BidirectionalSearch<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Instead of just adding features (forward) or just removing them (backward), this method does both alternately. This can escape local optima and find feature combinations that neither approach would find alone.
How It Works
Bidirectional search combines forward selection and backward elimination in an interleaved manner. It can add or remove features at each step, potentially finding better solutions than either method alone.
Constructors
| Constructor | Summary |
|---|---|
BidirectionalSearch(int nFeaturesToSelect, int maxIterations, int? randomState, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> FeatureScores { get; } |
|
bool SupportsInverseTransform { get; } |
|
int MaxIterations { 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) |