Regularized leastsquares regression using lasso or elastic net algorithms
B = lasso(X,Y)
B = lasso(X,Y,Name,Value)
[B,FitInfo]
= lasso(___)
returns
fitted leastsquares regression coefficients for a set of regularization
coefficients B
= lasso(X
,Y
)Lambda
.
fits
regularized regressions with additional options specified by one or
more B
= lasso(X
,Y
,Name,Value
)Name,Value
pair arguments.
[
, for any previous input syntax,
also returns a structure containing information about the fits.B
,FitInfo
]
= lasso(___)

Numeric matrix. Each row represents one observation, and each column represents one predictor (variable). 

Numeric vector of length 
Specify optional commaseparated pairs of Name,Value
arguments.
Name
is the argument
name and Value
is the corresponding
value. Name
must appear
inside single quotes (' '
).
You can specify several name and value pair
arguments in any order as Name1,Value1,...,NameN,ValueN
.

Absolute error tolerance used to determine convergence of ADMM Algorithm. The algorithm converges
when successive estimates of the coefficient vector differ by an amount
less than
Default:  

Scalar value in the interval Default:  

Initial values for xcoefficients in ADMM Algorithm.
Default: Vector of zeros  

Method
Default:  

Maximum number of nonzero coefficients in the model. Default:  

Vector of nonnegative
Default: Geometric sequence of  

Positive scalar, the ratio of the smallest to the largest If you set Default:  

Maximum number of iterations allowed, specified as a positive
integer. If the algorithm executes Default:  

Positive integer, the number of Monte Carlo repetitions for crossvalidation.
Default:  

Positive integer, the number of Default:  

Structure that specifies whether to crossvalidate in parallel,
and specifies the random streams. Create the
 

Cell array of character vectors representing names of the predictor
variables, in the order in which they appear in Default:  

Convergence threshold for the coordinate descent algorithm [3].
The algorithm terminates when successive estimates of the coefficient
vector differ in the L^{2} norm
by a relative amount less than Default:  

Augmented Lagrangian parameter ρ for ADMM Algorithm.
Default: Automatic selection  

Boolean value specifying whether
Default:  

Initial value of scaled dual variable u in ADMM Algorithm.
Default: Vector of zeros  

Observation weights, a nonnegative vector of length Default: 

Fitted coefficients, a  

Structure containing information about the model fits.
If you set the

[1] Tibshirani, R. "Regression Shrinkage and Selection via the Lasso." Journal of the Royal Statistical Society. Series B, Vol. 58, No. 1, 1996, pp. 267–288.
[2] Zou, H. and T. Hastie. "Regularization and Variable Selection via the Elastic Net." Journal of the Royal Statistical Society. Series B, Vol. 67, No. 2, 2005, pp. 301–320.
[3] Friedman, J., R. Tibshirani, and T. Hastie.
"Regularization Paths for Generalized Linear Models via Coordinate
Descent." Journal of Statistical Software. Vol.
33, No. 1, 2010. http://www.jstatsoft.org/v33/i01
[4] Hastie, T., R. Tibshirani, and J. Friedman. The Elements of Statistical Learning. 2nd edition. New York: Springer, 2008.
[5] Boyd, S. "Distributed Optimization and Statistical Learning via the Alternating Direction Method of Multipliers". Foundations and Trends in Machine Learning. Vol 3, No. 1, 2010, pp. 1–122.