BorutaSelector<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Embedded

Boruta feature selection using shadow features and random forest importance.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → BorutaSelector<T>

Implements: ISupervisedFeatureSelector<T>

For Beginners

Imagine testing each feature against a “random noise” version of itself. If a real feature is important, it should beat its noisy twin repeatedly. Boruta does this systematically, keeping only features that clearly outperform random chance.

How It Works

Boruta creates “shadow” features by shuffling original features. A random forest is trained, and features that consistently outperform the best shadow feature are confirmed as important. Features that never beat shadows are rejected.

Constructors

Constructor Summary
BorutaSelector(int nIterations, int nTrees, double percentile, int? randomState, int[] columnIndices)

Properties

Property Summary
Vector<T> FeatureImportances { get; }
bool SupportsInverseTransform { get; }
bool[] ConfirmedFeatures { get; }
bool[] TentativeFeatures { get; }
int NIterations { 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)