NSGAIISelector<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.MultiObjective
NSGA-II Multi-objective Feature Selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ NSGAIISelector<T>
Implements: ISupervisedFeatureSelector<T>
For Beginners
Sometimes we want both good accuracy AND few features. NSGA-II finds multiple solutions that trade off between these goals. Some solutions have high accuracy but many features; others have fewer features but slightly lower accuracy. You can then choose the best trade-off.
How It Works
Uses the Non-dominated Sorting Genetic Algorithm II (NSGA-II) to optimize multiple objectives simultaneously: maximizing prediction accuracy while minimizing the number of selected features.
Constructors
| Constructor | Summary |
|---|---|
NSGAIISelector(int maxFeatures, int populationSize, int nGenerations, double crossoverRate, double mutationRate, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> FeatureImportances { get; } |
|
bool SupportsInverseTransform { get; } |
|
int MaxFeatures { 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) |