|
From: Peter C. <pca...@gm...> - 2013-11-30 16:45:35
|
Hi Dirk, basically I agree. However we have to think about which dependencies we want. There are also license issues I guess, GSL is copylefted (R too ?), cplex is not free at all, is it ? Boost provides ODE solvers but only in 53++. Questions like this. As long as the implementations are done on solid ground and come with resonable unit tests (ups, I should send some for the optimizer) it is not bad to have some numerical firepower self contained in the library. I always liked it at least. Still you are right. I also sometimes thought, if some special functions, rngs etc. could be changed to simple wrappers to boost. Peter On 30 November 2013 15:11, Dirk Eddelbuettel <ed...@de...> wrote: > > 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 |