EnsembleFeatureSelector<T>

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

Ensemble Feature Selection combining multiple selection methods.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Different selection methods have different strengths. By combining them, we get more robust and reliable feature selection. Features that multiple methods agree on are more trustworthy.

How It Works

Ensemble Feature Selection aggregates results from multiple feature selection methods. Features consistently selected across methods are more likely to be truly important.

Aggregation methods:

  • Voting: Select features chosen by majority of methods
  • Ranking: Aggregate rankings using Borda count or similar
  • Weighted: Weight methods by their reliability

Constructors

Constructor Summary
EnsembleFeatureSelector(int nFeaturesToSelect, double votingThreshold, AggregationMethod<T> method, List<Func<Matrix<T>, Vector<T>, int[]>> selectors, int[] columnIndices)

Properties

Property Summary
Vector<T> AggregateScores { 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 AddSelector(Func<Matrix<T>, Vector<T>, int[]> selector) Adds a selector function to the ensemble.
void Fit(Matrix<T> data, Vector<T> target)