Description Usage Arguments Details Value Examples
Check the dual problem of the lasso problem helps us to know how far we are from optimal.
1 | Check_dual(data, par, res, g, lambda = c(8, 4))
|
data |
The CNV dataset prepared for lasso (see |
par |
The parameter prepared for lasso (see |
res |
The result after solving lasso problem (see |
g |
Integer-valued ploidy |
lambda |
L1-Penalty for all the variables (see |
This function would print out 5 values.
The first 2 are the dual variable and the 3rd and 4th should be your lambda parameters, which were used for Run_lasso
.
To achieve optimality, we should have the first 2 smaller or equal to the 3rd and 4th respectively.
However, due to numeric error, sometimes it is slightly larger (less than 0.01
The last one is a duality gap, but it is a valid value only when the requirement above is satisfied. And it is strictly positive when it is valid. However, it should be a small value in most cases.
None
1 | Check_dual(wkdata,par,Lasso_res,g_int)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.