Check_dual: Quality Control for Post-processing

Description Usage Arguments Details Value Examples

View source: R/Check_dual.R

Description

Check the dual problem of the lasso problem helps us to know how far we are from optimal.

Usage

1
Check_dual(data, par, res, g, lambda = c(8, 4))

Arguments

data

The CNV dataset prepared for lasso (see data_lasso)

par

The parameter prepared for lasso (see par_lasso)

res

The result after solving lasso problem (see Run_lasso)

g

Integer-valued ploidy

lambda

L1-Penalty for all the variables (see Run_lasso)

Details

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.

Value

None

Examples

1
Check_dual(wkdata,par,Lasso_res,g_int)

yun-feng/WGDAP documentation built on Nov. 5, 2019, 1:22 p.m.