R/mlnormal_soft_thresholding.R

Defines functions mlnormal_soft_thresholding

## File Name: mlnormal_soft_thresholding.R
## File Version: 0.13


mlnormal_soft_thresholding <- function( x, lambda )
{
    x_abs <- abs(x)
    x <- ifelse( x_abs > lambda, x - sign(x) * lambda, 0 )
    return(x)
}

Try the LAM package in your browser

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

LAM documentation built on May 18, 2022, 5:17 p.m.