CrossValidatedSelector<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.CrossValidation
Cross-Validated Feature Selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ CrossValidatedSelector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Cross-validation tests how well features predict targets on data not used for training. Features that consistently help predictions across multiple data splits are selected.
How It Works
Selects features based on their predictive performance evaluated using k-fold cross-validation with a simple linear model.
Constructors
| Constructor | Summary |
|---|---|
CrossValidatedSelector(int nFeaturesToSelect, int nFolds, int? randomState, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> CVScores { get; } |
|
bool SupportsInverseTransform { get; } |
|
int NFeaturesToSelect { get; } |
|
int NFolds { 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) |