Description Usage Arguments Author(s) References Examples
soft_thresholding
gives the soft threshold value of y given
the threshold
. When threshold
increasing, y shrinks to zero.
1 | soft_thresholding(y, threshold)
|
y |
input real value |
threshold |
threshold value |
JungJun Lee, Jae-Hwan Jhong, Young-Rae Cho, SungHwan Kim, Ja-yong Koo
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # clean up
rm(list = ls())
library(plde)
# soft thresholding operater
soft_thresholding(3, 1)
soft_thresholding(-3, 1)
# if the threshold value is large enough, it shrinks to zero
soft_thresholding(-3, 4)
soft_thresholding(3, 4)
# Plot of the soft thresholding operater
y = seq(-3, 3, length = 100)
st = NULL
for (i in 1 : length(y))
st[i] = soft_thresholding(y[i], 1)
plot(y, y, col = "gray", type = "l", ylab = "ST")
lines(y, st, col = "blue")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.