SCAD<T>
Models & Types ยท AiDotNet.Preprocessing.FeatureSelection.Embedded
Smoothly Clipped Absolute Deviation (SCAD) penalty for feature selection.
Inheritance: TransformerBase<T, Matrix<T>, Matrix<T>> โ SCAD<T>
Implements: IFixedCountFeatureSelector<T>, ISupervisedFeatureSelector<T>
For Beginners
LASSO tends to shrink large coefficients too much (bias). SCAD fixes this by penalizing large coefficients less aggressively while still shrinking small ones to zero. This gives you better estimates of important feature effects.
How It Works
SCAD is a non-convex penalty that addresses the bias problem of LASSO. It applies the same penalty as LASSO for small coefficients but reduces the penalty for large coefficients, leading to nearly unbiased estimates.
Constructors
| Constructor | Summary |
|---|---|
SCAD(int nFeaturesToSelect, double lambda, double a, int maxIterations, double tolerance, int[] columnIndices) |
Properties
| Property | Summary |
|---|---|
Vector<T> Coefficients { get; } |
|
bool SupportsInverseTransform { get; } |
|
double A { get; } |
|
double Lambda { 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) |