R/cdm_penalty_values_elnet.R

Defines functions cdm_penalty_values_elnet

## File Name: cdm_penalty_values_elnet.R
## File Version: 0.02

cdm_penalty_values_elnet <- function( x, lambda, alpha )
{
    lam1 <- lambda * alpha
    lam2 <- lambda * ( 1 - alpha )
    y <- lam1 * abs(x) + lam2 * x^2
    return(y)
}

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.