soft_thresholding: Soft thresholding

View source: R/function_softThresholding.R

soft_thresholdingR Documentation

Soft thresholding

Description

implementation of the proximal operator for l1 penalty (see e.g. Bubeck 2015)

Usage

soft_thresholding(x, lambda)

Arguments

x

vector of numerics, x = g - step.size * gradient(g)

lambda

float or list of floats, regularization parameter

Value

vector of numerics, same length as x

Examples

set.seed(1)
soft_thresholding(x = runif(10) - rnorm(10), lambda = 0.2)

MarianSchoen/DTD documentation built on April 29, 2022, 1:59 p.m.