lasso
Lasso and elastic net regularization for linear models.
📝Syntax
B = lasso(X, y)
B = lasso(X, y, Name, Value)
[B, FitInfo] = lasso(...)
📄Description

lasso fits L1 and elastic-net regularized linear models using coordinate descent.

Supported name-value options are Alpha, Lambda, LambdaRatio, NumLambda, Standardize, Intercept, MaxIter, RelTol, and Weights.

💡Examples
X = randn(100, 5);
y = X * [0; 2; 0; -3; 0] + 0.1 * randn(100, 1);
[B, FitInfo] = lasso(X, y, 'NumLambda', 10)
🔗See Also
ridgeregressrobustfit
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub