View source: R/function_softThresholding.R
soft_thresholding | R Documentation |
implementation of the proximal operator for l1 penalty (see e.g. Bubeck 2015)
soft_thresholding(x, lambda)
x |
vector of numerics, x = g - step.size * gradient(g) |
lambda |
float or list of floats, regularization parameter |
vector of numerics, same length as x
set.seed(1) soft_thresholding(x = runif(10) - rnorm(10), lambda = 0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.