SalpSwarm<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Metaheuristic
Salp Swarm Algorithm (SSA) for feature selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ SalpSwarm<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Salps are sea creatures that form chains. The first salp (leader) moves toward the best food, while others follow in line. This creates a balance between exploring new areas and exploiting known good spots, which helps find the best feature combinations.
How It Works
The Salp Swarm Algorithm is inspired by the swarming behavior of salps in oceans. Salps form a chain where the leader follows the food source and followers follow the salp ahead of them.
Constructors
| Constructor | Summary |
|---|---|
SalpSwarm(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) |