StudentTTest<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter.Statistical
Student’s t-test for feature selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → StudentTTest<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
This test asks: “Is the average value of this feature different enough between the two classes that it’s probably not due to random chance?” Features with large differences are more likely to be useful for distinguishing between classes.
How It Works
The Student’s t-test compares the means of two groups to determine if they are statistically different. For feature selection, it tests whether each feature has significantly different values between positive and negative classes.
Constructors
| Constructor | Summary |
|---|---|
StudentTTest(int nFeaturesToSelect, double alpha, bool equalVariances, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> PValues { get; } |
|
Vector<T> TStatistics { get; } |
|
bool EqualVariances { get; } |
|
bool SupportsInverseTransform { get; } |
|
double Alpha { 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) |