WelchTTest<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter.Statistical

Welch’s t-test for feature selection.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → WelchTTest<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

When comparing two groups that might have different amounts of spread (variance), Welch’s test is more reliable than the standard t-test. It’s generally recommended as the default choice for comparing two group means.

How It Works

Welch’s t-test is a variant of the Student’s t-test that does not assume equal variances between the two groups. It uses the Welch-Satterthwaite approximation for degrees of freedom.

Constructors

Constructor Summary
WelchTTest(int nFeaturesToSelect, double alpha, int[] columnIndices)

Properties

Property Summary
Vector<T> DegreesOfFreedom { get; }
Vector<T> PValues { get; }
Vector<T> TStatistics { 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)