Repository navigation
BackTracking: take the cubic minimizer in its conjugate form when b > 0 - #117
Open
ParadaCarleton wants to merge 1 commit into
Open
ParadaCarleton wants to merge 1 commit into
ParadaCarleton wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
When the cubic coefficient
ais small next tob,(-b + sqrt(b^2 - 3a dϕ₀)) / 3acancels-bagainst the square root. In Float32 this rounds the minimizer to 0, so every cubic step falls to theρ_lofloor and the search shrinks the step toward zero on a nearly quadratic merit. Forb > 0this takes the equal conjugate form-dϕ₀ / (b + sqrt(...)), which LineSearches.jl's BackTracking already uses;b <= 0keeps the original form, which does not cancel there. The added test hasϕ(α) = 1 - 1e-3 α + α² + 1e-6 α³in Float32, where the old formula returns 0 and the new one 5e-4.