MannWhitneyU<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter.Statistical

Mann-Whitney U test for feature selection.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → MannWhitneyU<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

This test asks: “Do the values of this feature tend to be higher in one group than another?” Unlike t-tests, it doesn’t require the data to follow a bell curve. It’s great for data that’s skewed or has outliers.

How It Works

The Mann-Whitney U test is a non-parametric test that compares the distributions of a feature between two groups. It doesn’t assume normality, making it robust for real-world data with outliers or skewed distributions.

Constructors

Constructor Summary
MannWhitneyU(int nFeaturesToSelect, double alpha, int[] columnIndices)

Properties

Property Summary
Vector<T> PValues { get; }
Vector<T> UStatistics { get; }
bool SupportsInverseTransform { get; }
double Alpha { 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)