SparseGroupLassoSelector<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Sparse
Sparse Group Lasso Feature Selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ SparseGroupLassoSelector<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
Sometimes features naturally come in groups (like one-hot encoded categories or polynomial terms). This method can select entire groups together while also selecting individual features within groups, giving you the best of both worlds.
How It Works
Combines Lasso (individual feature sparsity) with Group Lasso (group sparsity) to select features that are both individually and group-wise important.
Constructors
| Constructor | Summary |
|---|---|
SparseGroupLassoSelector(int nFeaturesToSelect, double alpha, double groupRatio, int[] groupIndices, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> Coefficients { get; } |
|
bool SupportsInverseTransform { get; } |
|
double Alpha { get; } |
|
double GroupRatio { 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) |