ParticleSwarmSelector<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Genetic
Particle Swarm Optimization based Feature Selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → ParticleSwarmSelector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Imagine a swarm of birds searching for food. Each bird (particle) explores feature combinations, remembers its best finds, and learns from the swarm’s best discoveries. Over time, they converge on good feature subsets.
How It Works
Uses particle swarm optimization to find optimal feature subsets where particles represent feature combinations moving through the solution space.
Constructors
| Constructor | Summary |
|---|---|
ParticleSwarmSelector(int nFeaturesToSelect, int swarmSize, int nIterations, double inertia, double cognitive, double social, int? randomState, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> FeatureImportances { get; } |
|
bool SupportsInverseTransform { get; } |
|
int NFeaturesToSelect { get; } |
|
int NIterations { get; } |
|
int SwarmSize { 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) |