-
Notifications
You must be signed in to change notification settings - Fork 50
Generalized Cauchy direction and box constraints #554
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
Open
mateuszbaran
wants to merge
127
commits into
master
Choose a base branch
from
mbaran/gcp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 109 commits
Commits
Show all changes
127 commits
Select commit
Hold shift + click to select a range
4fef1ea
initial code for GCP computation
mateuszbaran 8bdd5b1
formatting
mateuszbaran d428807
expand a little
mateuszbaran 69794c2
Merge remote-tracking branch 'origin/master' into mbaran/gcp
mateuszbaran 435f2a6
add a few more methods
mateuszbaran 2168761
Byrd's way of handling non-positive-definite (s, y) pairs in limited …
mateuszbaran 44b310a
start testing GCP
mateuszbaran c3a8a68
A few more tests
mateuszbaran d3bac42
Merge remote-tracking branch 'origin/master' into mbaran/gcp
mateuszbaran 75f7f15
fix "typos"
mateuszbaran 82ac90a
box tests in a separate file
mateuszbaran b94b0f1
start integration of GCP into quasi_Newton
mateuszbaran 2049c87
integrate GCPFinder into direction update (why doesn't this work right?)
mateuszbaran c51b0ff
Merge remote-tracking branch 'origin/master' into mbaran/gcp
mateuszbaran 34c796b
return d from fill_rho_i!
mateuszbaran 672e467
fix rho update
mateuszbaran 7b5dfe6
first successful run
mateuszbaran 99d193d
address review, fix bug
mateuszbaran da8f500
a little bit of docs
mateuszbaran 3c8cc8e
fix extref again?
mateuszbaran 5088950
StopWhenRelativeAPosterioriChangeCostLessOrEqual
mateuszbaran 1183d10
Merge remote-tracking branch 'origin/master' into mbaran/gcp
mateuszbaran 5365a08
improve consistency of stepsize limits
mateuszbaran 93da29f
some fixes and tests around max_stepsize, bound_direction_tweak! and …
mateuszbaran 8268499
fix Base.show for StopWhenRelativeAPosterioriChangeCostLessOrEqual
mateuszbaran fe28d25
more tests and change one name
mateuszbaran 231989e
formatting
mateuszbaran 5bac94f
more testing
mateuszbaran 22c93d9
improve coverage
mateuszbaran a4f9fb6
improve coverage a bit more
mateuszbaran 7bd9c3b
improve coverage; circumvent a Julia documenter bug
mateuszbaran f84e250
improve coverage
mateuszbaran ea18ab8
formatting
mateuszbaran 8966588
fix a bug
mateuszbaran ab5d20e
add max_stepsize function for ProbabilitySimplex and corresponding tests
mateuszbaran 4ac289a
improve docs
mateuszbaran 5d4f9b8
Apply suggestions from code review
mateuszbaran cf287f5
address some review comments
mateuszbaran 5f133a0
address more comments
mateuszbaran feda7cd
one more comment
mateuszbaran 9ef06f3
fix docs
mateuszbaran e08a588
fixing extref
mateuszbaran d21a606
don't specify arch
mateuszbaran 051cc58
expand docs
mateuszbaran 77686a7
address more review comments
mateuszbaran c3c12b8
update Project.toml
mateuszbaran 26acefe
add some details and fix some links
mateuszbaran 1dd6b99
forgot an inversion
mateuszbaran fadb2c5
optimize segment search by not requiring d_old; fix one test to have …
mateuszbaran fb65141
we only need d_z/Y_tmp in the generic updater, not the limited memory…
mateuszbaran d208582
Merge remote-tracking branch 'origin/master' into mbaran/gcp
mateuszbaran 0df091d
adapt to glossaries
mateuszbaran b8e176a
improve coverage
mateuszbaran 441b98a
streamline GCP direction search a bit
mateuszbaran 97f6e8e
rename
mateuszbaran fb05f46
refactor segment updater to be more minimal (common logic went to the…
mateuszbaran 4f52e80
more cleanup in GCP
mateuszbaran cc74add
rearrange arguments to a more logical order
mateuszbaran 1063eb6
CMA ES should probably use passed RNG for the initial point?
mateuszbaran e8afe8d
move one temporary to the segment propagator that needs it
mateuszbaran 3f96bde
Merge remote-tracking branch 'origin/master' into mbaran/gcp
mateuszbaran e854a1e
improve coverage
mateuszbaran 3fc6a7f
Add test for hitting multiple bounds in Generalized Cauchy Point Finder
mateuszbaran bb4a560
improve naming
mateuszbaran 2545ee8
Remove IJulia from the tutorials project. Maybe that helps.
kellertuer 4026cd3
rename t to stepsize in function names
mateuszbaran a925853
Merge remote-tracking branch 'origin/mbaran/gcp' into mbaran/gcp
mateuszbaran bc94a85
fix convergence indication for StopWhenRelativeAPosterioriCostChangeL…
mateuszbaran ef47ff2
rename GCP to GCD
mateuszbaran f5f1901
GCD in tutorial
mateuszbaran 89f2530
set seed to try avoiding random errors
mateuszbaran 8060ae5
add missing page
mateuszbaran bebc93f
fix convergence indication of StopWhenChangeLess
kellertuer 1522b4b
Update docs/src/solvers/generalized_cauchy_direction_subsolver.md
mateuszbaran 909c464
rename a few things, expand docs
mateuszbaran 4a79ea6
add missing docs entry
mateuszbaran 7f8ecc4
improve names
mateuszbaran 1ddca2c
remove warning that isn't necessary
mateuszbaran 7e61e53
formatting
mateuszbaran a21d072
improve numerical robustness
mateuszbaran 7c9377a
also detect nondescent direction at inner product 0
mateuszbaran a6982b5
Wrong eps was taken there
mateuszbaran f0200c1
fix test
mateuszbaran c4f1aae
Update test/plans/test_stopping_criteria.jl
mateuszbaran 3a30dd8
support stepsize limiting in LineSearchesStepsize
mateuszbaran eb9bac4
fix + test
mateuszbaran 853f377
skip non-coverable line
mateuszbaran e2fc841
fix a few issues with quasi-Newton
mateuszbaran 2a03750
improve coverage
mateuszbaran 3d86de1
Merge remote-tracking branch 'origin/master' into mbaran/gcp
mateuszbaran fa2ad1c
allow for larger max stepsizes in post-GCD linesearch when away from …
mateuszbaran 2245a9d
Add Hager-Zhang 2006 linesearch
mateuszbaran 030d588
remove initial stepsize parameters; add some docs
mateuszbaran 9c1d358
fix edge case issues of HZ line search; expand docs on GCD; use line …
mateuszbaran b97b851
test one more edge case
mateuszbaran 89ee8d0
test initialize_stepsize! for HZ
mateuszbaran aebaadb
improve coverage
mateuszbaran 8ba964c
optimize quasi_Newton step
mateuszbaran afc73b1
Merge remote-tracking branch 'origin/master' into mbaran/gcp
mateuszbaran 8d9540a
more docs for HZ, a new test, removed commented out line
mateuszbaran 4216ef8
use provided gradient for dphi_0 in HZ
mateuszbaran 3180c30
avoid cost reevaluation for stopping criteria in certain cases
mateuszbaran f169224
avoid tangent allocation
mateuszbaran e03cb9c
optimize a few things
mateuszbaran a9859ec
improve coverage
mateuszbaran 1c3d2d3
streamline set_stepsize_bound! logic
mateuszbaran b5214a3
generalize to Hyperrectangle at any position
mateuszbaran 30a497b
cleanup
mateuszbaran 31243d4
fix ambiguity, improve test
mateuszbaran 4d792ed
address review regarding HZ stepsize
mateuszbaran 9c2d4af
expand changelog, stepsize initialization
mateuszbaran 56ec7a0
Update src/plans/stepsize/stepsize.jl
mateuszbaran 5293783
Merge remote-tracking branch 'origin/master' into mbaran/gcp
mateuszbaran 59d2468
Make GCD more type stable
mateuszbaran 0018cd5
Add simple directional stepsize limiting for completeness
mateuszbaran a192dcc
fix docs
mateuszbaran 7308ea0
add an early termination condition for HZ linesearch; add show method…
mateuszbaran 25407c1
test new printing methods
mateuszbaran 0cca30e
improve coverage
mateuszbaran 19d7df2
rename Finder to Subsolver, don't store manifold inside
mateuszbaran 7ba3ce6
Apply suggestions from code review
mateuszbaran 0d72c4a
address one more issue
mateuszbaran 4156ff5
update docs
mateuszbaran a44c7ca
address two more review comments (Github doesn't seem to be able to a…
mateuszbaran 03ab065
a bit more comments, a bit more UTF, a bit better name for an interna…
mateuszbaran 815cc55
Handle decorators in `get_cost`
mateuszbaran 74828de
Merge branch 'master' into mbaran/gcp
mateuszbaran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
docs/src/solvers/generalized_cauchy_direction_subsolver.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Generalized Cauchy Direction subsolver | ||
|
|
||
| The Generalized Cauchy Direction (GCD) subsolver is a component in optimization algorithms that handle problems with bound constraints. It solves the following problem | ||
|
|
||
| ```math | ||
| \begin{align*} | ||
| \operatorname*{arg\,min}_{Y ∈ T_p D \times \mathcal{M}}&\ m_p(Y), \qquad m_p(Y) = ⟨X_g, Y⟩_p + \frac{1}{2} ⟨\mathcal{H}_p[Y], Y⟩_p\\ | ||
| \text{such that}& \ \exp_p(Y) = \exp_p(\alpha X) \in D \times \mathcal{M} \text{ for some } \alpha \in [0, A] | ||
| \end{align*} | ||
| ``` | ||
|
|
||
| where $X=(X_{\mathrm{D}}, X_{\mathcal{M}})$ is a given direction, the exponential map handles projection of the tangent vector when reaching the boundary, $D$ is a box domain ([`Hyperrectangle`](@extref Manifolds.Hyperrectangle)), $\mathcal{M}$ is a Riemannian manifold, $X_g$ is the gradient of a scalar function $f$ at point $p=(p_{\mathrm{D}}, p_{\mathcal{M}})$, $A$ is the maximum allowed step size on $\mathcal{M}$ at point $p=(p_{\mathrm{D}}, p_{\mathcal{M}})$ in direction $X_{\mathcal{M}}$ (infinity is supported) and $\mathcal{H}_p$ is a linear operator that approximates the Hessian of $f$ at $p$. | ||
|
|
||
| Additionally, the subsolver indicates whether the selected direction $Y$ reaches the boundary of $D$ at some point, in which case the subsequent step size selection in direction $Y$ needs to be limited to the interval $[0, s_{\max}]$, where the number $1 \leq s_{\max} \leq \infty$ is also returned by the subsolver. | ||
mateuszbaran marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Note that the value $s_{\max}=1$ is obtained when the minimum lies at the boundary of $D$, while larger values indicate that we are further away from the boundary along the selected direction $X$. | ||
kellertuer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| The solver is currently primarily intended for internal use by optimization algorithms that require bound-constrained subproblem solutions. | ||
|
|
||
| ## Internal types and method | ||
|
|
||
| ### Symbols related to the GCD computation | ||
|
|
||
| These symbols are directly used by solvers to compute the descent direction corresponding to the Generalized Cauchy direction. | ||
|
|
||
| ```@docs | ||
| Manopt.has_anisotropic_max_stepsize | ||
| Manopt.find_generalized_cauchy_direction! | ||
| Manopt.GeneralizedCauchyDirectionFinder | ||
| ``` | ||
|
|
||
| ### Symbols related to the Hessian approximation | ||
|
|
||
| These symbols are used to evaluate the Hessian approximation at specific tangent vectors during the generalized Cauchy direction computation. | ||
|
|
||
| ```@docs | ||
| Manopt.hessian_value | ||
| Manopt.hessian_value_diag | ||
| ``` | ||
|
|
||
| ### Symbols related to bound handling | ||
|
|
||
| These are internal symbols used to manage and manipulate bound constraints during the GCP computation. | ||
|
|
||
| ```@docs | ||
| Manopt.init_updater! | ||
| Manopt.UnitVector | ||
| Manopt.to_coordinate_index | ||
| Manopt.AbstractSegmentHessianUpdater | ||
| Manopt.GenericSegmentHessianUpdater | ||
| Manopt.get_bounds_index | ||
| Manopt.get_stepsize_bound | ||
| Manopt.get_at_bound_index | ||
| Manopt.set_stepsize_bound! | ||
| Manopt.set_zero_at_index! | ||
| ``` | ||
|
|
||
| ### Symbols related to specific Hessian approximations | ||
|
|
||
| ```@docs | ||
| Manopt.LimitedMemorySegmentHessianUpdater | ||
| Manopt.hessian_value_from_inner_products | ||
| Manopt.set_M_current_scale! | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.