KruskalWallisSelector<T>

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

Kruskal-Wallis H-Test Feature Selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

The Kruskal-Wallis test extends the Wilcoxon test to more than two groups. It checks if different classes have significantly different distributions for a feature, using ranks instead of actual values.

How It Works

Uses the Kruskal-Wallis H-test to select features for multi-class problems. This is a non-parametric alternative to one-way ANOVA.

Constructors

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

Properties

Property Summary
Vector<T> HStatistics { 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)