HotellingT2Selector<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Statistical
Hotelling’s T² based Feature Selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → HotellingT2Selector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
While a t-test compares means of one variable, Hotelling’s T² compares mean vectors of multiple variables simultaneously. It accounts for correlations between features when testing if two groups differ. Features contributing most to group separation are selected.
How It Works
Selects features based on Hotelling’s T² statistic, the multivariate generalization of the t-test for comparing two group means.
Constructors
| Constructor | Summary |
|---|---|
HotellingT2Selector(int nFeaturesToSelect, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> T2Contributions { 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) |