R/cdm_penalty_threshold_lasso.R

Defines functions cdm_penalty_threshold_lasso

Documented in cdm_penalty_threshold_lasso

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

cdm_penalty_threshold_lasso <- function( val, eta )
{
    res <- val
    res <- ifelse( abs(val) < eta, 0, res )
    res <- ifelse( val > eta, val - eta, res )
    res <- ifelse( val < - eta, val + eta, res )
    return(res)
}

cdm_soft_threshold <- cdm_penalty_threshold_lasso

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.