VarianceThreshold<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter

Variance Threshold feature selection.

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

Implements: IFeatureSelector<T>

For Beginners

If a feature has almost the same value for every sample, it can’t help distinguish between them. This method removes features that are too “flat” or constant. A variance of 0 means the feature is exactly the same for all samples.

How It Works

Removes features whose variance is below a specified threshold. Features with low variance contain little information and are unlikely to be predictive.

Constructors

Constructor Summary
VarianceThreshold(double threshold, int[] columnIndices)

Properties

Property Summary
Vector<T> Variances { get; }
bool SupportsInverseTransform { get; }
double Threshold { get; }
int[] SelectedIndices { get; }

Methods

Method Summary
bool[] GetSupportMask()
string[] GetFeatureNamesOut(string[] inputFeatureNames)