soft_thresh: Soft thresholding calculation

Description Usage Arguments Value Examples

View source: R/Lasso-function.R

Description

Soft thresholding calculation

Usage

1

Arguments

x

a numeric vector

b

threshold values

Value

a numeric vector with the same length as x after soft thresholding

Examples

1
2
3
4
set.seed(1)
x <- rnorm(5)
b <- 0.2
soft_thresh(x,b)

lcw68/G3proj documentation built on Dec. 21, 2021, 9:46 a.m.