Giter Site home page Giter Site logo

Comments (5)

vadixidav avatar vadixidav commented on July 3, 2024

@jannschu do you think you could give some advice on this?

My naive guess is that perhaps the trust region is too small and it is choosing to bias more towards gradient descent than Gauss-Newton. I haven't been using this library recently, but my guess would be to increase the trust region size. When the damping factor is zero, Leverberg-Marquardt behaves like Gauss-Newton, and when it is high it behaves like gradient descent. My guess is that the damping factor is not getting set low enough at some point, but I don't know how to configure the logic for converging and backing off the damping factor. I defer to @jannschu, as they know much more about how the current implementation works (they ported it from MINPACK).

from levenberg-marquardt.

jannschu avatar jannschu commented on July 3, 2024

Is this problem a 3D version of the beacon finding problem shown in the video? Is the source code already somewhere?

The tiny step sizes might indicate a wrong Jacobian. How do you compute it? If your problem is reasonably fast to to port to Python or Matlab you could check if the reference implementation from MINPACK gives different results. Should that be the case I would consider this a bug.

If given a correct solution as initial parameters the algorithm should terminate immediately since the gradient should be zero.

To answer your question regarding ignoring ftol and gtol: You may set them to zero, but the algorithm will still terminate if the predicted or actual reduction is below the the machine precision.

from levenberg-marquardt.

ChristopherRabotin avatar ChristopherRabotin commented on July 3, 2024

from levenberg-marquardt.

jannschu avatar jannschu commented on July 3, 2024

You said a good description of the problem you are solving is given at the start of the linked YouTube video. There I can only find a problem where the location of a transmitter shall be found through distances to beacons. The other page only seems to contain a high level list of things you want to control.

I also looked in the nyx_space repository, but I could not find the code you are working on.

In order to proceed I would suggest to provide a minimal working example and if possible a comparison with MINPACK. A description of the least-squares problem would also be helpful.

It converges on the correct solution in 8 evaluations if I provide it with the exact solution of the Gauss Newton algorithm.

This is, as I said, quite suspicious. Other basic things to check would be that the gradient for the correct x is computed, that is in the right form (matches residuals), and that it was not multiplied with -1. More generally, your optimization problem must be correctly mapped to the form this library expects. But it seems you already spent quite some time on that.

It also seems you want to find a root. Modeling this as a least squares problem might give you local minima.

Since there is no description of the least-squares description of the problem you want to solve (unless I spent hours digging into orbital targeting, which is new to me) , there is no minimal code for me to work with, there is no comparison with other LM implementations where it does work, and your issue only contains examples of iterations which are meaningless to me, and that I answered the question on xtol and ftol it seems that was the best we can do here. Sorry, I feel your frustrations :-(

from levenberg-marquardt.

ChristopherRabotin avatar ChristopherRabotin commented on July 3, 2024

from levenberg-marquardt.

Related Issues (10)

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.