DistanceCorrelation<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter

Distance Correlation for detecting nonlinear relationships between features and target.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Pearson correlation can miss relationships where one variable depends on another in a curved or complex way. Distance correlation catches all types of relationships. If it’s zero, the variables are truly independent; if it’s high, there’s some kind of relationship (linear or not).

How It Works

Distance correlation measures both linear and nonlinear dependencies between variables. Unlike Pearson correlation which only detects linear relationships, distance correlation equals zero if and only if the variables are statistically independent.

Constructors

Constructor Summary
DistanceCorrelation(int nFeaturesToSelect, double minCorrelation, int[] columnIndices)

Properties

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