GenericUnivariateSelect<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection

Generic univariate feature selector with configurable selection mode.

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

Implements: ISupervisedFeatureSelector<T>

For Beginners

This is like a Swiss Army knife for feature selection. Instead of using different classes for different strategies, you pick a mode:

  • KBest: “Give me the top 10 features”
  • Percentile: “Give me the top 10% of features”
  • FPR/FDR/FWE: “Give me features with statistical significance below 0.05”

How It Works

GenericUnivariateSelect is a flexible feature selector that can operate in different modes: k-best, percentile, FPR (false positive rate), FDR (false discovery rate), or FWE (family-wise error rate). This provides a unified interface for various univariate selection strategies.

Constructors

Constructor Summary
GenericUnivariateSelect(SelectionMode mode, double param, Func<Matrix<T>, Vector<T>, ValueTuple<Vector<T>, Vector<T>>> scoreFunc, UnivariateScoreFunction defaultScoreFunc, int[] columnIndices)

Properties

Property Summary
SelectionMode Mode { get; }
Vector<T> PValues { get; }
Vector<T> Scores { get; }
bool SupportsInverseTransform { get; }
double Param { 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)