Take the Levenberg-Marquardt step from the Jacobian, not the normal matrix - #536
Merged
Conversation
…atrix
Forming B^T W B squares the condition number of the least-squares problem.
For a six-parameter orbit that is survivable, but adding a non-gravitational
amplitude is not: A2 is of order 1e-14 au/day^2 and shares an unscaled matrix
with positions of order 1 au, so on (6489) Golevka cond(sqrt(W) B) = 2.6e10
becomes cond(B^T W B) = 9.2e19 -- four orders past what double precision
resolves. The solve then rank-truncates without complaint: the three position
components of the step come back as exactly zero and the non-grav amplitude
never leaves its seed.
Solve the equivalent damped least-squares problem
min || [ sqrt(W) B ; sqrt(lambda) I ] dX - [ -sqrt(W) r ; 0 ] ||
by Householder QR instead. The step is the same one; the condition number is
merely no longer squared. A sequential-update prior (issue #419) enters
exactly, as Cholesky rows.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Sep 3, 2026
Closed
Open
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.
Closes #535.
Replaces the normal-equation solve with a Householder QR of the augmented weighted Jacobian,
which is the same damped step with the condition number no longer squared. A sequential-update prior (#419) enters exactly, as Cholesky rows. BᵀWB is still formed for the covariance and the conditioning check.
Full suite green (549 passed). Cross-check: solving the normal equations after Jacobi equilibration gives bit-identical A2 on all seven test fits, so both routes reach the same least-squares solution.
Two follow-ups this exposes are filed separately: the weak-constraint guard tests the whole correlation matrix rather than the non-grav direction, and the 1e-15 A2 placeholder is not dynamically negligible.
🤖 Generated with Claude Code