Proximal Operators
The proximal operator for a variety of commonly used functions in optimization, data science, machine learning, and econometrics.
$\ell_{1}$-norm
ProximalMethods.soft_thresh — Functionsoft_thresh(x, λ)Compute soft thresholding operator with scaling parameter λ at x, proximal operator of $ℓ₁$-norm.
Arguments
x::Real: inputλ::Real: scaling parameter
Returns
y::Real: soft thresholded value
$\ell_{2}$-norm
ProximalMethods.block_soft_thresh — Functionblock_soft_thresh(x, λ)Compute block soft thresholding operator with scaling parameter λ at x, proximal operator of the $ℓ₂$-norm.
Arguments
x::AbstractVector: input (n x 1)λ::Real: scaling parameter
Returns
y::AbstractVector: block soft thresholded value (n x 1)
ProximalMethods.block_soft_thresh! — Functionblock_soft_thresh!(y, x, λ)Compute block soft thresholding operator with scaling parameter λ at x, proximal operator of the $ℓ₂$-norm, storing the results in y. See also block_soft_thresh.
block_soft_thresh!(x, λ)Compute block soft thresholding operator with scaling parameter λ at x, proximal operator of the $ℓ₂$-norm, overwriting x. See also block_soft_thresh.
$\ell^{2}_{2}$-norm (ridge)
ProximalMethods.shrinkage — Functionshrinkage(x, λ)Compute shrinkage operator with scaling parameter λ at x, proximal operator of the squared ℓ₂-norm (ridge).
Arguments
x::Real: inputλ::Real: scaling parameter
Returns
y::Real: shrunken value
shrinkage(x, λ, fac, b)Compute the generalized shrinkage operator with scaling parameter λ at x, proximal operator of a quadratic function with quadratic parameters A and linear parameters b using a factorization fac of $I + λA$.
Arguments
x::AbstractVector: inputλ::Real: scaling parameterfac::Factorization: factorization of $I + λA$b::AbstractVector: linear coefficients
Returns
y::AbstractVector: shrunken values
shrinkage(x, λ, A, b)Compute the generalized shrinkage operator with scaling parameter λ at x, proximal operator of a quadratic function with quadratic parameters A and linear parameters b.
Arguments
x::AbstractVector: inputλ::Real: scaling parameterA::AbstractMatrix: quadratic coefficientsb::AbstractVector: linear coefficients
Returns
y::AbstractVector: shrunken values
ProximalMethods.shrinkage! — Functionshrinkage!(x, λ, fac, b)Compute the generalized shrinkage operator with scaling parameter λ at x, proximal operator of a quadratic function with quadratic parameters A and linear parameters b using a factorization fac of $I + λA$, overwriting x. See also shrinkage.
shrinkage!(x, λ, A, b)Compute the generalized shrinkage operator with scaling parameter λ at x, proximal operator of a quadratic function with quadratic parameters A and linear parameters b, overwriting x. See also shrinkage.
Smooth function
ProximalMethods.smooth — Functionsmooth(x, λ, f, ∇f!, y_prev)Compute the proximal operator of a general smooth function f with in-place gradient ∇f! and scaling parameter λ at x using L-BFGS. Warm starting is accomodated by the use of y_prev, the previous solution.
Arguments
x::AbstractVector: inputλ::Real: scaling parameterf::Function: objective function∇f!::Function: gradienty_prev::AbstractVector: previous output
Returns
y::AbstractVector: output
ProximalMethods.smooth! — Functionsmooth!(y, x, λ, f, ∇f!, y_prev)Compute the proximal operator of a general smooth function f with in-place gradient ∇f! and scaling parameter λ at x using L-BFGS, storing the results in y. See also smooth!. Warm starting is accomodated by the use of y_prev, the previous solution.
smooth!(x, λ, f, ∇f!, y_prev)Compute the proximal operator of a general smooth function f with in-place gradient ∇f! and scaling parameter λ at x using L-BFGS, overwriting x. See also smooth!. Warm starting is accomodated by the use of y_prev, the previous solution.