AntColonySelector<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Genetic
Ant Colony Optimization based Feature Selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → AntColonySelector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Like ants finding food, virtual ants explore feature combinations. Good combinations get “pheromone” deposited, making those features more likely to be selected in future. Over time, pheromones guide ants to good feature subsets.
How It Works
Uses ant colony optimization where artificial ants construct solutions by probabilistically selecting features based on pheromone trails.
Constructors
| Constructor | Summary |
|---|---|
AntColonySelector(int nFeaturesToSelect, int nAnts, int nIterations, double evaporationRate, double alpha, double beta, int? randomState, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> Pheromones { get; } |
|
bool SupportsInverseTransform { get; } |
|
int NAnts { get; } |
|
int NFeaturesToSelect { get; } |
|
int NIterations { 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) |