Learn R Programming

smog (version 2.1.0)

proxL2: L2 proximal operator

Description

L2 proximal operator

Usage

proxL2(x, lambda)

Arguments

x

A vector of p numerical values.

lambda

numeric value for the L2 penalty parameter.

Value

A numeric vector soft-thresholded by \(\lambda\) as a group, which is \((1-\frac{\lambda \sqrt{p}}{\sqrt{x_1^2+\cdots+x_p^2}})_{+}\bm{x}\).

References

ma2019structuralsmog

Examples

Run this code
# NOT RUN {
proxL2(rnorm(6,2,1),0.5)

# }

Run the code above in your browser using DataLab