Following the example in the function admm.lasso, the estimated coefficients are small but not zero. Their values are seem to related to the argument reltol, so how many digits are valid?
m = 50
n = 100
p = 0.1 # percentange of non-zero elements
x0 = matrix(Matrix::rsparsematrix(n,1,p))
A = matrix(rnorm(m*n),nrow=m)
for (i in 1:ncol(A)){
A[,i] = A[,i]/sqrt(sum(A[,i]*A[,i]))
}
b = A%*%x0 + sqrt(0.001)*matrix(rnorm(m))
## set regularization lambda value
lambda = 0.1*Matrix::norm(t(A)%*%b, 'I')
## run example
output = admm.lasso(A, b, lambda)
output$x
I got advised that the solution will be sparse if the output variable is z. To verify that, is it possible to add the output of z from the output from admm_lasso.cpp
Following the example in the function admm.lasso, the estimated coefficients are small but not zero. Their values are seem to related to the argument reltol, so how many digits are valid?
Thanks
Example in the R package