DifferentialEvolutionFS<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Wrapper
Differential Evolution for feature selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ DifferentialEvolutionFS<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
DE evolves a population of candidate solutions. To create new solutions, it takes differences between existing ones and adds them to others. This creates mutations that explore the search space efficiently. For feature selection, these continuous values are converted to yes/no decisions about each feature.
How It Works
Differential Evolution (DE) is an evolutionary optimization algorithm that uses mutation based on the difference between population members. For feature selection, real-valued vectors are converted to binary feature masks using thresholding.
Constructors
| Constructor | Summary |
|---|---|
DifferentialEvolutionFS(int nFeaturesToSelect, int populationSize, int nGenerations, double mutationFactor, double crossoverRate, Func<Matrix<T>, Vector<T>, int[], T> scorer, int? randomState, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> FeatureScores { get; } |
|
bool SupportsInverseTransform { get; } |
|
double CrossoverRate { get; } |
|
double MutationFactor { get; } |
|
int NFeaturesToSelect { 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) |