Repository navigation
Backtrack along the Cauchy step once the Newton step is cut back below it - #1635
Merged
Merged
Conversation
…w it Near a singular J, Newton and Halley crept to max_iter; they now reach the local minimum of |F| and report it. Closes #1628 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Near a singular J, Newton and Halley crept to max_iter; they now reach the local minimum of |F| and report it.
Closes #1628
Once the backtracked Newton step t·a is shorter than the Cauchy step −(‖g‖²/‖Jg‖²)g, g = JᵀF, the line search restarts along the Cauchy step (the dogleg rule, with t‖a‖ as the radius), and the Armijo test and quadratic interpolation use the actual slope gᵀp. Acceptance is now strict, so a step too short to change ‖F‖ is not accepted.
A test on the angle between the Newton step and −g, as suggested in the issue, breaks Powell's badly scaled problem, where that angle is ~1e-8 throughout but Newton is right.
Calls of f on Freudenstein–Roth. Bold: ran to max_iter = 1000. Every other run ends at the non-root minimum, ‖F‖ = 6.9989, with
evaluation_error.On the existing test problems (circle_line, rosenbrock, broyden10, powell, squares) the iterations and calls are unchanged, except Newton on squares from (1/1024, 0.5): 11 → 17 calls.
Freudenstein–Roth from 400×300 starts, x1 ∈ [−5, 20], x2 ∈ [−4, 6], max_iter = 1000:
🤖 Generated with Claude Code