-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Utilities] add distance_to_set for SecondOrderCone #2060
Conversation
we need to be very careful with distance to set with exponentials. We corrected it several times with @tjdiamandis because it is still ongoing research due to its numerical instability |
A great reference for this is https://docs.mosek.com/whitepapers/expcone-proj.pdf (Section 5 and Lemma 5.1, specifically). |
We could just convert to |
I added a test for an |
# Parikh, N., & Boyd, S. (2014). Proximal algorithms. Foundations and | ||
# trends in Optimization, page 184, section 6.3.2. | ||
t, rhs = x[1], LinearAlgebra.norm(@views x[2:end]) | ||
if rhs <= -t # Projection to the point (0, [0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean (t, [0]) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think I mean (0, [0])
? I just followed Section 6.3.2 here: https://web.stanford.edu/~boyd/papers/pdf/prox_algs.pdf
# trends in Optimization, page 184, section 6.3.2. | ||
t, rhs = x[1], LinearAlgebra.norm(@views x[2:end]) | ||
if rhs <= -t # Projection to the point (0, [0]) | ||
return LinearAlgebra.norm(x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we also do sqrt(2)/2 abs(t - rhs) ?
src/Utilities/distance_to_set.jl
Outdated
t, rhs = x[1], LinearAlgebra.norm(@views x[2:end]) | ||
if rhs <= -t # Projection to the point (0, [0]) | ||
return LinearAlgebra.norm(x) | ||
elseif t >= rhs # Projection to the point (t, x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would simply do abs(t) >= rhs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
Part of #2033.
We'll need to decide what sets we use exact methods for, and what we make up.
Boyd's book is: https://web.stanford.edu/~boyd/papers/pdf/prox_algs.pdf