Skip to content

Fixes for structured LBFGS approximation.#38

Open
lambe wants to merge 5 commits intoPythonOptimizers:developfrom
lambe:develop
Open

Fixes for structured LBFGS approximation.#38
lambe wants to merge 5 commits intoPythonOptimizers:developfrom
lambe:develop

Conversation

@lambe
Copy link

@lambe lambe commented Dec 16, 2016

No description provided.

Andrew Lambe 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.
@dpo
Copy link
Collaborator

dpo commented Jan 29, 2017

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)?

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])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this already computed in aTs[l]?

update = (aTsk / aTsl) * ad[:, l] + (adTsk / aTsl) * a[:, l] - \
(aTsk * adTsl / aTsl**2) * a[:, l]
a[:, k] -= update.copy()
ad[:, k] -= update.copy()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these changes? It's hard to tell whether they actually modify the behavior or are just a rewrite.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, it's just a rewrite to make the similarity between structured LBFGS and structured LSR1 obvious.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. In that case, it's wasteful to recompute the dot products that are already stored in aTs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll simplify it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments