soft_thresholding gives the soft threshold value of y given the threshold. When threshold increasing, y shrinks to zero.
soft_thresholding(y, threshold)
Arguments
y: input real value
threshold: threshold value
Examples
# clean uprm(list = ls())library(plde)# soft thresholding operatersoft_thresholding(3,1)soft_thresholding(-3,1)# if the threshold value is large enough, it shrinks to zerosoft_thresholding(-3,4)soft_thresholding(3,4)# Plot of the soft thresholding operatery = seq(-3,3, length =100)st =NULLfor(i in1: length(y)) st[i]= soft_thresholding(y[i],1)plot(y, y, col ="gray", type ="l", ylab ="ST")lines(y, st, col ="blue")
Author(s)
JungJun Lee, Jae-Hwan Jhong, Young-Rae Cho, SungHwan Kim, Ja-yong Koo
References
JungJun Lee, Jae-Hwan Jhong, Young-Rae Cho, SungHwan Kim and Ja-Yong Koo. "Penalized Log-density Estimation Using Legendre Polynomials." Submitted to Communications in Statistics - Simulation and Computation (2017), in revision.