Some methods that require derivative/gradient information have a fully-numerical version, suffixed `_num`, where derivatives are evaluated using finite-differences. Prefer providing analytical gradients to the methods when possible.
### Solvers
Solvers allow to solve non-linear functions: $$ f(x) = 0 $$ or $$ f(\vec{x}) = \vec{0} $$
Gradient based solvers use the gradient of the function to be solved in order to help with the convergence of the numerical method. Some methods, such as Halley's or Laguerre's, even require the second order derivative.
Here is a list of the univariate gradient-based solvers implemented in the library :
- Newton's method (`newton_solve`)
- Newton's method with finite-differences derivatives (`newton_solve_num`)
- Halley's method (`halley_solve`)
- Halley's method with finite-differences derivatives (`halley_solve_num`)
- ~~Laguerre's method (`laguerre_solve`)~~
- ~~Laguerre's method with finite-differences derivatives (`laguerre_solve_num`)~~
Derivative-free solvers, as they name suggest, do not require the derivatives of the function in order to solve it. They are usually more robust, but suffer from a lower convergence rate. They are however very useful when the function to solve does not have a closed-form derivative, or when it is too noisy.
Derivative-free optimizers do not require the gradient of the function and are generally more robust to noisy objective functions. Some optimizers are local and other are global. Local optimizers tend to converge to the minimum that is closest to the given starting point. Global minimizers are capable of exploring the solution space more extensively and can sometimes return the global minimum of the objective function.
Gradient-based optimizers require the gradient of the function in order to speed-up convergence. Some of them even require the Hessian matrix (second derivative) to be computed (Quasi-Newton method for example).
##### Derivative-free optimizers
Derivative-free optimizers do not require the gradient of the function and are generally more robust to noisy objective functions.
The following non-linear least-squares problem can be solved more efficiently using specialised techniques than generic optimizers :$$ \min_{\beta} \sum_{i=0}^{N} (f(x_i, \beta) - y_i)^2 $$
Here is a list of multivariate non-linear least-squares solvers implemented in the library :