BaggingFeatureSelector<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Ensemble
Bagging-based Feature Selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ BaggingFeatureSelector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Bagging creates many random subsets of your data, evaluates feature importance on each subset, then combines the results. This helps ensure that the selected features are consistently important across different parts of your data, not just important by chance.
How It Works
Uses bootstrap aggregation (bagging) to create multiple subsamples and aggregates feature importance across all subsamples for robust selection.
Constructors
| Constructor | Summary |
|---|---|
BaggingFeatureSelector(int nFeaturesToSelect, int nEstimators, double subsampleRatio, int? randomState, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> AggregatedScores { get; } |
|
bool SupportsInverseTransform { get; } |
|
int NEstimators { 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) |