View source: R/update_functions.R
RSAVS_Softthresh | R Documentation |
This function performs the so-called 'soft threshholding' on the input
vector(invec
) based on the given threshholding value(thresh
)
RSAVS_Softthresh(invec, thresh)
invec |
numerical vector, the original input value |
thresh |
non-negative scalar, the threshholding point |
outvec
. For each input entry invec[i]
, the output value
outvec[i]
is
outvec[i] = invec[i] - thresh
: if invec[i] > thresh
outvec[i] = invec[i] + thresh
: if invec[i] < -thresh
outvec[i] = 0
: if otherwise
RSAVS:::RSAVS_Softthresh(seq(-2, 2, by = 0.1), thresh = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.