|
From: Dirk E. <ed...@de...> - 2013-11-30 14:11:13
|
On 22 November 2013 at 21:58, Peter Caspers wrote: | Hi, | | picking up the topic "global optimization" which was mentioned recently | on the quantlib user conference I added an experimental simulated | annealing optimizer here | | https://github.com/lballabio/quantlib/pull/57 | | which is a reimplementation from the one in Numerical Recipes, 2nd ed. Nice. | I do not have real use cases at the moment. However I tried it with the | toy example minimizing | | f(x,y) = (2.0+sin(x)*sin(y))*(x*x+y*y) | | starting at (10,20) with (a rather unfavorable) lambda = 1 for building | the initial simplex. A start temperature of 1000.0 and 500 moves for | cooling down to zero finds the global optimum at (0,0) in 667 | iterations. The success is obviously dependent on suitable parameters | though. | | DifferentialEvolution which is already available in the library does | also find the minimum. It needs 5900 iterations in my experiment, but | works out of the box with the standard configuration. The bigger question is whether QL should venture into re-implementing topics that are well-understood and provided by other domains? Eg R comes with five optimizers built in [as options to function optim()], yet people keep contributing new ones: http://cran.r-project.org/web/views/Optimization.html It's a tough call. There is definitely a use case for optimization, but maybe a 'hook' (to the GSL, some coin-or algo, cplex, ... ) may be better in the long run? Dirk -- Dirk Eddelbuettel | ed...@de... | http://dirk.eddelbuettel.com |