DistanceCorrelation<T>

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

Distance Correlation-based feature selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Regular correlation only catches straight-line relationships. Distance correlation can detect curved, U-shaped, or any type of pattern between variables. A distance correlation of 0 means truly no relationship at all.

How It Works

Distance correlation measures the dependence between random variables, detecting both linear and nonlinear relationships. Unlike Pearson correlation, it equals zero if and only if the variables are independent.

Constructors

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

Properties

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