mlpack / ensmallen

A header-only C++ library for numerical optimization --
http://ensmallen.org
Other
740 stars 119 forks source link

Which optimizer should I use? #388

Closed DKGH closed 8 months ago

DKGH commented 9 months ago

I have a pair of vectors: x and y. x is just a linspace thing. y is close to a differentiable function f(x). To fit my function, I need to minimize (y - f(x))^2. y is not differentiable. Which method should I use here?

I have tried LBFGS, which gives good results (but it may still be trapped in a local minima). I have also tried simulated annealing. However that gives arbitrary results.

zoq commented 9 months ago

Have you tried, PSO?

DKGH commented 9 months ago

This is working better. Thanks.