WhaleOptimizationFS<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Wrapper
Whale Optimization Algorithm for feature selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ WhaleOptimizationFS<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Whales hunt by creating bubble nets around fish. This algorithm mimics this with shrinking circles and spirals to converge on good feature combinations.
How It Works
Inspired by humpback whale bubble-net feeding. Uses shrinking encircling and spiral updating to hunt prey (optimal solution).
Constructors
| Constructor | Summary |
|---|---|
WhaleOptimizationFS(int nFeaturesToSelect, int populationSize, int nIterations, Func<Matrix<T>, Vector<T>, bool[], double> fitnessFunc, int? randomState, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
bool SupportsInverseTransform { get; } |
|
double BestFitness { get; } |
|
double[] FeatureImportances { 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) |