SignalToNoiseRatio<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter

Signal-to-Noise Ratio (SNR) for binary classification feature selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Think of the “signal” as the difference between class averages (what distinguishes them) and “noise” as the variation within each class (what makes it hard to tell them apart). A high SNR means the distinguishing signal is much stronger than the confusing noise.

How It Works

SNR measures the ratio of the difference in class means to the sum of their standard deviations. Higher SNR indicates features where classes are well separated relative to their internal variation.

Constructors

Constructor Summary
SignalToNoiseRatio(int nFeaturesToSelect, double minSNR, int[] columnIndices)

Properties

Property Summary
Vector<T> SNRValues { 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)