JuliaSmoothOptimizers / JuliaSmoothOptimizers/ShiftedProximalOperators.jl

Values returned by prox! function

Open
#160 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
7
Forks
10
Avg merge
16m
Merged PRs (30d)
1

Description

For a given function $h$, prox! functions from `ShiftedProximalOperators` return the value of the proximal operator while prox! function from `ProximalOperator` return the value of $h$ evaluate in $\mathrm{prox}_h$.

To be consistent, I think that prox! function from `ShiftedProximalOperators` should also return the (shifted) value of $h$.
For exemple, the Moreau envelope in `ProximalOperator` uses the value of $h$ as the return value of the prox function:
```julia
function (f::MoreauEnvelope)(x)
R = eltype(x)
buf = similar(x)
g_prox = prox!(buf, f.g, x, f.lambda)
return g_prox + R(1) / (2 * f.lambda) * norm(buf .- x)^2
end
```
The return value will be incorrect if the function is derived from `ShiftedProximalOperators`.

Contributor guide

Open the contributing guide

Research direction

Compare the prox! implementations in ShiftedProximalOperators and ProximalOperator, then inspect the MoreauEnvelope call shown in the issue. Make the shifted implementation return the shifted value of h consistently with ProximalOperator, and verify that MoreauEnvelope produces the correct value when built from ShiftedProximalOperators.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.