Fixes for structured LBFGS approximation.#38
Open
lambe wants to merge 5 commits intoPythonOptimizers:developfrom
Open
Fixes for structured LBFGS approximation.#38lambe wants to merge 5 commits intoPythonOptimizers:developfrom
lambe wants to merge 5 commits intoPythonOptimizers:developfrom
Conversation
added 5 commits
December 13, 2016 16:05
The function now produces the same result as the other LBFGS approximations when y and yd are identical vectors.
warnings about negative values in the square root and changed the step acceptance threshold to be more permissive.
Collaborator
|
Could you please somehow add a test that verifies the correctness of this? Perhaps by comparing to a full BFGS update on a small examples (3 or 4 variables)? |
dpo
reviewed
Mar 30, 2017
| ad[:, k] += update.copy() | ||
| aTsk = np.dot(a[:, l], s[:, k]) | ||
| adTsk = np.dot(ad[:, l], s[:, k]) | ||
| aTsl = np.dot(a[:, l], s[:, l]) |
Collaborator
There was a problem hiding this comment.
Wasn't this already computed in aTs[l]?
dpo
reviewed
Mar 30, 2017
| update = (aTsk / aTsl) * ad[:, l] + (adTsk / aTsl) * a[:, l] - \ | ||
| (aTsk * adTsl / aTsl**2) * a[:, l] | ||
| a[:, k] -= update.copy() | ||
| ad[:, k] -= update.copy() |
Collaborator
There was a problem hiding this comment.
Why these changes? It's hard to tell whether they actually modify the behavior or are just a rewrite.
Author
There was a problem hiding this comment.
If I remember correctly, it's just a rewrite to make the similarity between structured LBFGS and structured LSR1 obvious.
Collaborator
There was a problem hiding this comment.
Ok. In that case, it's wasteful to recompute the dot products that are already stored in aTs.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.