DispersionRatio<T>

Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Filter

Dispersion Ratio for comparing within-class to between-class variation.

Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ†’ DispersionRatio<T>

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

A good feature for classification should have class groups that are far apart (high between-class variance) and tight clusters (low within-class variance). The dispersion ratio captures this by dividing the separation by the spread. High values mean easy-to-separate classes.

How It Works

The dispersion ratio measures the ratio of between-class variance to within-class variance. Features with high dispersion ratios have well-separated class means relative to the variation within each class.

Constructors

Constructor Summary
DispersionRatio(int nFeaturesToSelect, double minRatio, int[] columnIndices)

Properties

Property Summary
Vector<T> BetweenClassVariances { get; }
Vector<T> DispersionRatios { get; }
Vector<T> WithinClassVariances { 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)