StabilitySelection<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Stability
Stability Selection for robust feature selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ StabilitySelection<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Different samples of your data might give different feature rankings. Stability selection checks which features are consistently chosen across many random samples. Features that are always selected are likely to be truly important, not just lucky in one particular sample.
How It Works
Stability selection runs feature selection on multiple random subsets of the data and keeps features that are consistently selected across runs. This reduces the variance of feature selection and produces more reliable results.
Constructors
| Constructor | Summary |
|---|---|
StabilitySelection(int nFeaturesToSelect, int nIterations, double subsampleRatio, double selectionThreshold, int? randomState, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> SelectionFrequencies { get; } |
|
bool SupportsInverseTransform { get; } |
|
double SelectionThreshold { get; } |
|
double SubsampleRatio { get; } |
|
int NFeaturesToSelect { 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) |