gonum / optimize

Packages for solving minimization problems [DEPRECATED]
66 stars 9 forks source link

optimize: curve-fitting - implement Levenberg-Marquardt algorithm (damped least-squares) #174

Closed sbinet closed 5 years ago

sbinet commented 8 years ago

just a follow-up on: https://www.reddit.com/r/golang/comments/4atete/levenbergmarquardt_or_gaussnewton_go

https://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm

Paraphrasing the above wikipedia link:

LMA is used to solve non-linear least squares problems. The LMA is used in many software applications for solving generic curve-fitting problems.

btracey commented 8 years ago

I'm not sure where it should be located. Levenberg-Marquardt isn't the same as the other methods in optimize as it only solves a specific kind of problem. It may still belong in the base package, but I'm not sure.

btracey commented 8 years ago

Maybe optimize/nlls? Otherwise maybe in addition to local we could have another function.

vladimir-ch commented 8 years ago

I would prefer another function (LeastSquares?) taking another kind of problem (LeastSquaresProblem or LSProblem?).

phil-mansfield commented 7 years ago

I wanted to check in on the status of this issue (and about curve fitting in general in the Go environment).

The reason I'm asking is that I'm currently working on a Go-based affine-invariant Markov chain Monte Carlo sampler (similar to emcee) for one of my own projects. If you guys are interested, this could be used as a backend for general purpose fitting routines.

(MCMC doesn't fill exactly the same niche as LM, so it would probably be best to have an LM implementation, too.)

sbinet commented 7 years ago

AFAIK, nobody is actively working on this.

I still think it is indeed worthy of having in the gonum toolkit. Feel free to either open a PR or drop a message on the gonum mailing list.

sbinet commented 7 years ago

@phil-mansfield FYI, I have started a design investigation at go-hep/fit with discussion on the gonum mailing list: https://groups.google.com/forum/#!topic/gonum-dev/AGekBtNCfJ8.

vladimir-ch commented 5 years ago

Closing because there is now https://github.com/gonum/gonum/issues/295 in the new repository.