VarianceThreshold<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Unsupervised

Variance Threshold for removing low-variance features.

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

Implements: IFeatureSelector<T>

For Beginners

If a feature has the same value for almost all samples, it can’t help distinguish between them. This method removes such uninformative features automatically.

How It Works

Removes features with variance below a specified threshold. Features with very low variance carry little information and are often constant or near-constant.

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
Matrix<T> FitTransform(Matrix<T> data)
bool[] GetSupportMask()
string[] GetFeatureNamesOut(string[] inputFeatureNames)