Giter Club home page Giter Club logo

Comments (17)

mlubin avatar mlubin commented on May 16, 2024

@sebastien-villemot, I didn't contribute to the Newton code, but this seems off. From the literature I've read, the line search step size should be reset to 1 each time.

from optim.jl.

matthieugomez avatar matthieugomez commented on May 16, 2024

In my problem, NLsolve returns the error "Too many iterations in backtracking_linesearch!". So it does not seem like the best choice in all cases.

from optim.jl.

mlubin avatar mlubin commented on May 16, 2024

PRs accepted

from optim.jl.

johnmyleswhite avatar johnmyleswhite commented on May 16, 2024

Arguably we should remove backtracking_linesearch since it never works well in my experience.

from optim.jl.

johnmyleswhite avatar johnmyleswhite commented on May 16, 2024

Any progress on this?

from optim.jl.

pkofod avatar pkofod commented on May 16, 2024

Should we perhaps deprecate backtracking_linesearch?

from optim.jl.

pkofod avatar pkofod commented on May 16, 2024

I think we should benchmark the change before doing anything, but resetting to 1.0 seems like the right thing to do. I have other stuff to finish, and limited time, but if no one else grabs it, I'll have a look at some point.

from optim.jl.

cortner avatar cortner commented on May 16, 2024

please don't remove backtracking line search; I am just in the process of rewriting it. On my first tests, I actually beat HZ and MT line search with LBFGS.

from optim.jl.

cortner avatar cortner commented on May 16, 2024

Btw, I just notices that the same 1.0 problem is also in LBFGS.

from optim.jl.

cortner avatar cortner commented on May 16, 2024

Personally, I always use an extrapolation step, which defaults to 1.0 if it ends up near 1.0. This is my current implementation; just as a quick hack to try it out:

        if iteration > 1
           alphaguess = 2.0 * (f_x - f_x_previous) / dphi0
           alphaguess = max(alphaguess, alpha/4.0)
           alphaguess = min(alphaguess, 1.0)
           if alphaguess > 0.75
               alphaguess = 1.0
           end
        else
            alphaguess = 1.0
        end

On Rosenbrock example:

linesearch : F-evals / G-evals
HZ : 60 / 81
MT : 76 / 76
new BT : 45 / 72

(HZ is for ConjugateGradients, the rest for LBFGS)

from optim.jl.

cortner avatar cortner commented on May 16, 2024

some variant of this might even fix #166

from optim.jl.

pkofod avatar pkofod commented on May 16, 2024

@cortner where are we on this, was this fixed somewhere?

from optim.jl.

anriseth avatar anriseth commented on May 16, 2024

An improvement to backtracking was introduced as a non-default option here: JuliaNLSolvers/LineSearches.jl#7.
Further updates that change default behaviour of backtracking will be merged with JuliaNLSolvers/LineSearches.jl#20.

The Newton algorithm still seems to be lacking the resetting state.alpha = 1.0 step, which is the best default in the "good" regions for Newton.

from optim.jl.

pkofod avatar pkofod commented on May 16, 2024

But this is now a LineSearches.jl issue right? Or do you need something from optim ?

from optim.jl.

cortner avatar cortner commented on May 16, 2024

No - it is more complicated. What Linesearches.jl really needs is a refactoring to make linesearches tyoes rather than functions: this will definitely affect Optim.

from optim.jl.

cortner avatar cortner commented on May 16, 2024

See #294 and JuliaNLSolvers/LineSearches.jl#9

from optim.jl.

pkofod avatar pkofod commented on May 16, 2024

closed by #328

from optim.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.