LARSSelector<T>

Models & Types · AiDotNet.Preprocessing.FeatureSelection.Regression

Least Angle Regression (LARS) based Feature Selection.

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

Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>

For Beginners

LARS is like a compromise between forward selection and Lasso. It adds features gradually, moving in a direction that’s equally correlated with all currently active features. This gives a natural ordering of feature importance.

How It Works

Uses LARS algorithm to select features by progressively adding features along the direction equiangular to all active features.

Constructors

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

Properties

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