KruskalWallisH<T>

Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Filter.Univariate

Kruskal-Wallis H test for non-parametric multi-class feature selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

This test extends Mann-Whitney U to more than 2 groups. It ranks all values together, then checks if different classes have significantly different rank distributions. Works well for non-normal data.

How It Works

The Kruskal-Wallis H test is a non-parametric alternative to one-way ANOVA. It tests whether samples from multiple groups come from the same distribution.

Constructors

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

Properties

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