FisherExactTest<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter.Univariate
Fisher’s Exact Test for categorical feature selection with small samples.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → FisherExactTest<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
When you have categorical features and binary targets, this test determines if there’s a significant relationship. Unlike chi-square, it works well even with small sample sizes or sparse cells.
How It Works
Fisher’s Exact Test computes the exact probability of observing the contingency table assuming independence. Unlike chi-square, it’s accurate for small samples.
Constructors
| Constructor | Summary |
|---|---|
FisherExactTest(int nFeaturesToSelect, int nBins, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> OddsRatios { 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) |