R/cdm_penalty_threshold_elnet.R

Defines functions cdm_penalty_threshold_elnet

Documented in cdm_penalty_threshold_elnet

## File Name: cdm_penalty_threshold_elnet.R
## File Version: 0.05

cdm_penalty_threshold_elnet <- function( beta, lambda, alpha )
{
    lam1 <- lambda * alpha
    lam2 <- lambda * ( 1 - alpha )
    res <- cdm_soft_threshold( val=beta, eta=lam1 )
    res <- res / ( 1 + 2*lam2 )
    return(res)
}

Try the CDM package in your browser

Any scripts or data that you put into this service are public.

CDM documentation built on Aug. 25, 2022, 5:08 p.m.