CorrelationBasedFS<T>
Models & Types · AiDotNet.Preprocessing.FeatureSelection.Filter
Correlation-based Feature Selection (CFS).
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> → CorrelationBasedFS<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
CFS looks for features that are strongly related to what you want to predict but not too similar to each other. Having two features that are almost identical doesn’t help much - you want diverse information sources that all point toward the target.
How It Works
CFS evaluates feature subsets by considering both feature-target correlation (relevance) and feature-feature correlation (redundancy). Good subsets have high correlation with the target but low intercorrelation among features.
Constructors
| Constructor | Summary |
|---|---|
CorrelationBasedFS(int nFeaturesToSelect, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> FeatureScores { 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) |