PearsonCorrelationSelector<T>

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

Pearson Correlation based Feature Selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Pearson correlation measures how closely two variables follow a straight line together. Values near 1 or -1 indicate strong linear relationships, while values near 0 indicate no linear relationship.

How It Works

Selects features based on their Pearson correlation coefficient with the target, measuring the linear relationship strength between feature and target.

Constructors

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

Properties

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