checkKKT: Check the KKT condition of lasso solutions

Description Usage Arguments Details Value

View source: R/util.R

Description

This function returns TRUE if and only if the lasso solution satisfy the KKT condition.

Usage

1
checkKKT(y, X, lambda, beta.hat, tol = 1e-05)

Arguments

y,

the response vector.

X,

the design matrix.

lambda,

the tuning parameter.

beta.hat,

the lasso solution.

tol,

the tolerance.

Details

This function assumes the quadratic loss is scaled by 1/2n. That is,

1/(2n) * ||y-Xβ||_2^2 + λ * ||β||_1

Value

This function returns the desired logical result.


shuxiaoc/outference documentation built on Dec. 5, 2017, 3:48 a.m.