DragonflyAlgorithm<T>

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

Dragonfly Algorithm (DA) for feature selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

This algorithm mimics how dragonflies swarm. They avoid collisions (separation), fly in the same direction (alignment), stay close to the group (cohesion), move toward food (good solutions), and flee from enemies (bad solutions). This balance of exploration and exploitation finds good features.

How It Works

The Dragonfly Algorithm is inspired by the static and dynamic swarming behaviors of dragonflies. It uses five main principles: separation, alignment, cohesion, attraction towards food, and distraction from enemies.

Constructors

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

Properties

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