HarmonySearchFS<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Wrapper
Harmony Search algorithm for feature selection optimization.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → HarmonySearchFS<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Like musicians improvising together, this algorithm creates new feature combinations by blending elements from known good combinations, with occasional random exploration.
How It Works
Inspired by musical improvisation, Harmony Search maintains a “harmony memory” of good solutions and creates new ones by combining and modifying existing harmonies.
Constructors
| Constructor | Summary |
|---|---|
HarmonySearchFS(int nFeaturesToSelect, int harmonyMemorySize, int nIterations, double harmonyMemoryConsideringRate, double pitchAdjustingRate, Func<Matrix<T>, Vector<T>, bool[], T> fitnessFunc, int? randomState, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
T BestFitness { get; } |
|
Vector<T> FeatureImportances { 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) |