prox_op | R Documentation |
One-dimensional proximal operator
prox_op(f_prime, lambda, x)
f_prime |
Function. Derivative of the function f. |
lambda |
Numeric. Inverse penalty. |
x |
Numeric. Input variable. |
A numeric value
\mathrm{prox}_{\lambda f}(x) = \mathrm{argmin}_x f(z) + \frac{1}{2\lambda}(z-x)^2.
It solves the equation
f'(z) + \frac{1}{\lambda}(z-x) = 0.
f <- function(x) 1/(1+exp(-x))
prox_op(f, 1, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.