BatAlgorithm<T>

Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Metaheuristic

Bat Algorithm for feature selection.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ†’ BatAlgorithm<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Bats use sound pulses to find food. When far from prey, they use loud, low-frequency sounds. As they get closer, they use quieter, higher-frequency sounds. This algorithm mimics that behavior - exploring broadly at first, then focusing on promising areas.

How It Works

The Bat Algorithm mimics the echolocation behavior of bats. Bats adjust their pulse frequency and loudness as they approach prey, which translates to exploration-exploitation balance in optimization.

Constructors

Constructor Summary
BatAlgorithm(int nFeaturesToSelect, int populationSize, int maxIterations, double frequencyMin, double frequencyMax, int? randomState, int[] columnIndices)

Properties

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