RidgeImportanceSelector<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Regression

Ridge Regression Importance based Feature Selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

Ridge regression shrinks coefficients toward zero but doesn’t eliminate them. Features with larger coefficients after this shrinkage are more important. Unlike Lasso, Ridge handles correlated features gracefully by sharing importance among them.

How It Works

Selects features based on their coefficient magnitudes from ridge regression, which handles multicollinearity well while preserving all features.

Constructors

Constructor Summary
RidgeImportanceSelector(int nFeaturesToSelect, double alpha, int[] columnIndices)

Properties

Property Summary
Vector<T> Coefficients { get; }
bool SupportsInverseTransform { get; }
double Alpha { 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)