SMOTEFeatureSelector<T>

Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Imbalanced

SMOTE-aware Feature Selection for imbalanced datasets.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ†’ SMOTEFeatureSelector<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

When you have few examples of one class (like rare diseases), regular feature selection might ignore patterns specific to that class. This method creates synthetic examples of the minority class first, then selects features that distinguish both classes well.

How It Works

This feature selector is designed for imbalanced datasets where one class is significantly underrepresented. It evaluates features after synthetic minority oversampling to ensure selected features work well on balanced data.

Constructors

Constructor Summary
SMOTEFeatureSelector(int nFeaturesToSelect, int nNeighbors, double samplingRatio, int? randomState, int[] columnIndices)

Properties

Property Summary
Vector<T> FeatureScores { get; }
bool SupportsInverseTransform { get; }
double SamplingRatio { get; }
int NFeaturesToSelect { get; }
int NNeighbors { 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)