TTestSelector<T>

Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Statistical

Two-Sample T-Test based Feature Selection.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ†’ TTestSelector<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

The t-test checks if two groups have different average values. This selector finds features where classes have significantly different means, which helps in classification tasks.

How It Works

Selects features based on their t-statistic from two-sample t-tests between classes, identifying features with significantly different means.

Constructors

Constructor Summary
TTestSelector(int nFeaturesToSelect, int[] columnIndices)

Properties

Property Summary
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)