3

Does anyone have any experience with the Apache Commmons Math optimization package? More specifically, the Nelder-Mead method implementation? Is it pretty high quality?

skaffman
  • 398,947
  • 96
  • 818
  • 769
alex
  • 625
  • 3
  • 7
  • 12

2 Answers2

4

Nelder-Mead is one of the most popular multivariate optimization algorithm. The Apache implmentation is pretty good.

However, if you have more information, e.g., gradient, you should consider using a more "informed" algorithm such as BFGS. It also works with analytical gradient (using finite differencing). R uses BFGS by default, I think...

SuanShu has implemented 10+ Java optimization algorithms that you can choose for your purpose. Hope this helps.

Ryu
  • 41
  • 2
3

Note that Apache Commons Math also contains Michael Powell's direct search BOBYQA algorithm. This algorithm generally converges in substantially fewer iterations than the classical Nelder-Mead method, plus it also supports bounds on the variables.

Anders Gustafsson
  • 15,837
  • 8
  • 56
  • 114
  • Looks like BOBYQA is deprecated and scheduled to be removed though. I wouldn't use it in any long-term applications – Brian Knoblauch Dec 27 '13 at 19:39
  • 3
    @BrianKnoblauch For reasons unknown to me, the *Apache Commons Math* optimization packages are being completely refactored and moved to other namespaces in the upcoming release. The refactored implementation of the *BOBYQA* algorithm is now available in the [org.apache.commons.math3.optim.nonlinear.scalar.noderiv](http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/optim/nonlinear/scalar/noderiv/BOBYQAOptimizer.html) package. I am updating the hyperlink in the answer accordingly. – Anders Gustafsson Dec 27 '13 at 20:32