SelectFwe<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Filter.Univariate
Selects features based on a family-wise error rate test.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ SelectFwe<T>
Implements: ISupervisedFeatureSelector<T>
For Beginners
FWER is the strictest correction:
- Controls the probability of ANY false positive
- Uses Bonferroni: alpha/number_of_features
- Very conservative: may miss true positives
- Best when false positives are costly
How It Works
SelectFwe applies Bonferroni correction to control the probability of making even one false positive among all selected features.
This is the most conservative multiple testing correction, dividing the significance threshold by the number of tests.
Constructors
| Constructor | Summary |
|---|---|
SelectFwe(double alpha, SelectKBestScoreFunc scoringFunction, int[] columnIndices) |
Creates a new instance of SelectFwe. |
Properties
| Property | Summary |
|---|---|
SelectKBestScoreFunc ScoringFunction { get; } |
Gets the scoring function used. |
Vector<T> AdjustedPValues { get; } |
Gets the Bonferroni-adjusted p-values. |
Vector<T> PValues { get; } |
Gets the original p-values for each feature. |
Vector<T> Scores { get; } |
Gets the scores for each feature. |
bool SupportsInverseTransform { get; } |
Gets whether this transformer supports inverse transformation. |
double Alpha { get; } |
Gets the family-wise significance level (alpha). |
int[] SelectedIndices { get; } |
Gets the indices of selected features. |
Methods
| Method | Summary |
|---|---|
Matrix<T> FitTransform(Matrix<T> data, Vector<T> target) |
Fits and transforms the data. |
bool[] GetSupportMask() |
Gets the support mask indicating which features are selected. |
string[] GetFeatureNamesOut(string[] inputFeatureNames) |
Gets the output feature names after transformation. |
void Fit(Matrix<T> data, Vector<T> target) |
Fits the selector by computing Bonferroni-corrected p-values. |