B = lasso(X, y)
B = lasso(X, y, Name, Value)
[B, FitInfo] = lasso(...)
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.
X = randn(100, 5);
y = X * [0; 2; 0; -3; 0] + 0.1 * randn(100, 1);
[B, FitInfo] = lasso(X, y, 'NumLambda', 10)
| Version | Description |
|---|---|
| 2.0.0 | initial version |