RandomizedLassoSelector<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Stability
Randomized Lasso Feature Selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ RandomizedLassoSelector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Regular Lasso can be unstable - small changes in data can lead to different features being selected. Randomized Lasso runs Lasso many times with random perturbations and selects features that are consistently chosen, giving more reliable results.
How It Works
Combines Lasso with random reweighting and subsampling to provide more stable feature selection that is less sensitive to the choice of regularization parameter.
Constructors
| Constructor | Summary |
|---|---|
RandomizedLassoSelector(int nFeaturesToSelect, int nIterations, double alpha, double sampleFraction, double weaknessRange, int? randomState, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> SelectionProbabilities { 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) |