Nothing
S_soft <- function(z,lambda){
## -----------------------------------------------------------------------------------------------------------------
## The name of the function: S_soft
## -----------------------------------------------------------------------------------------------------------------
## Description:
## Define the soft threshold operator.
## -----------------------------------------------------------------------------------------------------------------
## Required preceding functions or packages: No
## -----------------------------------------------------------------------------------------------------------------
## Input:
## @ z: a float value or a vector, the independent variable.
## @ lambda: a float value, the tuning parameter.
## -----------------------------------------------------------------------------------------------------------------
## Output:
## @ The result of the soft threshold operator.
## -----------------------------------------------------------------------------------------------------------------
return((abs(z) - lambda)*(abs(z) - lambda > 0)*sign(z))
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.