MarginSelector<T>

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

Margin based Feature Selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

The margin is the distance between classes. Features with larger margins make it easier to separate classes with more confidence, similar to how SVM maximizes margins.

How It Works

Selects features based on the margin they create between classes, preferring features with larger class separation margins.

Constructors

Constructor Summary
MarginSelector(int nFeaturesToSelect, int[] columnIndices)

Properties

Property Summary
Vector<T> MarginScores { get; }
bool SupportsInverseTransform { 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)