prox_op: One-dimensional proximal operator

View source: R/prox_op.R

prox_opR Documentation

One-dimensional proximal operator

Description

One-dimensional proximal operator

Usage

prox_op(f_prime, lambda, x)

Arguments

f_prime

Function. Derivative of the function f.

lambda

Numeric. Inverse penalty.

x

Numeric. Input variable.

Value

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.

Examples

f <- function(x) 1/(1+exp(-x))
prox_op(f, 1, 1)

zq00/glmhd documentation built on April 7, 2023, 7:45 a.m.