fslaborg / FSharp.Stats

statistical testing, linear algebra, machine learning, fitting and signal processing in F#
https://fslab.org/FSharp.Stats/
Other
210 stars 56 forks source link

Add more Optimization / Minimization algorithms #193

Open Recktenwald opened 2 years ago

Recktenwald commented 2 years ago

Is your feature request related to a problem? Please describe. Currently, there is no way to find the argument / function value that minimizes a target function. Such operations are often useful.

Describe the solution you'd like I suggest implementing a relatively small set of algorithms that can handle a wide range of target functions. Specifically, I suggest implementing

This Sequential Quadratic Approach is also used in the default method chosen by the scipy.optimize.minimize function. The scipy package is however relying on a Fortran implementation, and I'm not sure if F# native performance will be enough. There is a big suite of Test functions for optimization, and benchmarking could be done with a handful of these.

Describe alternatives you've considered Use MathNET.Numerics instead, and write some glue code. Also, it could be discussed if a different set of algorithms would make more sense. I'm not sure about the performance tradeoffs of using SQP as the de-facto standard for everything, that cannot be managed with Nelder-Mead.

Additional context Add any other context or screenshots about the feature request here.

bvenn commented 2 years ago

In the past we already had some optimizations, that we had to omit because of dependencies of the Microsoft solver foundation (see here). It would be great to have these optimizations back in FSharp.Stats :+1:

bvenn commented 1 year ago

add nelder mead c3a98d412c2f58d992d5ea0b46995b9092bae86e