Skip to content
This repository has been archived by the owner on Nov 23, 2018. It is now read-only.

Modify bisection so it only requests the gradient when appropriate #143

Merged
merged 1 commit into from
Oct 2, 2015

Conversation

btracey
Copy link
Member

@btracey btracey commented Oct 1, 2015

No description provided.

@btracey
Copy link
Member Author

btracey commented Oct 1, 2015

Fixes #127

// in that direction.
if g > 0 {
b.maxStep = b.currStep
b.maxF = f
Copy link
Member

Choose a reason for hiding this comment

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

We use f even though the last operation was GradEvaluation. We should either document that Linesearchers must receive the previous function value after requesting GradEvaluation or (probably better) we should store f after FuncEvaluation and then we don't have to assume anything.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@vladimir-ch
Copy link
Member

LGTM once the commented line is removed

@vladimir-ch
Copy link
Member

Btw, I like how our recent changes gradually reduce the runtime of the tests. This change helps especially CG, its search directions are badly scaled and the linesearch takes a couple of iterations (7-10 on average last time I checked, of course depending on the problem).

btracey added a commit that referenced this pull request Oct 2, 2015
Modify bisection so it only requests the gradient when appropriate
@btracey btracey merged commit 14dc48c into master Oct 2, 2015
@btracey btracey deleted the bisectiongrad branch October 2, 2015 03:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants