Description Usage Arguments Value
View source: R/lasso_covariance.R
Solve the least squares loss with lasso penalty written in a form with the covariance matrix : \frac{1}{2} β^{'} Σ β - ρ^{'} β + λ \|β\|_1
1 2 3 4 5 6 7 8 9 10 | lasso_covariance(
n,
p,
lambda,
control = list(maxIter = 1000, optTol = 10^(-5), zeroThreshold = 10^(-6)),
XX,
Xy,
beta.start,
penalty = c("lasso", "SCAD")
)
|
n |
Number of samples of the design matrix |
p |
Number of features of the matrix |
lambda |
penalty parameter |
control |
Including control parameters : max of iterations, tolerance for the convergence of the error, zero threshold to put to zero small beta coefficients |
XX |
Design matrix corresponding to \frac{1}{n} X'X or a modified version in the case of CoCoLasso |
Xy |
Rho parameter corresponding to \frac{1}{n} X'y or a modified version in the case of CoCoLasso |
beta.start |
Initial value of beta |
penalty |
Type of penalty used : can be lasso penalty or SCAD penalty |
list containing
coefficients : Coefficients corresponding to final beta after convergence of the algoritm
coef.list : Matrix of coefficients for beta for all iterations
num.it Number of iterations
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.