WelchTTest<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter.Univariate
Welch’s t-test for binary classification with unequal variances.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → WelchTTest<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Regular t-test assumes both classes have similar spread (variance). If one class has much more variation than the other, Welch’s t-test gives more accurate results. It’s generally safer to use when you’re unsure about variance equality.
How It Works
Welch’s t-test is an adaptation of Student’s t-test that doesn’t assume equal variances between groups. It uses the Welch-Satterthwaite approximation for degrees of freedom.
Constructors
| Constructor | Summary |
|---|---|
WelchTTest(int nFeaturesToSelect, double pValueThreshold, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> DegreesOfFreedom { get; } |
|
Vector<T> PValues { get; } |
|
Vector<T> TStatistics { 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 Fit(Matrix<T> data, Vector<T> target) |