KruskalWallisTest<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter.Univariate
Kruskal-Wallis H test for non-parametric feature selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → KruskalWallisTest<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Unlike ANOVA which assumes data follows a normal bell curve, Kruskal-Wallis works with any data distribution. It converts values to ranks and tests whether the ranks differ between groups. This is more robust when your data has outliers or non-normal distributions.
How It Works
A non-parametric alternative to one-way ANOVA that doesn’t assume normal distributions. Tests whether samples from different groups originate from the same distribution based on ranks.
Constructors
| Constructor | Summary |
|---|---|
KruskalWallisTest(int nFeaturesToSelect, double pValueThreshold, 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) |