global optimizers

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

global optimizers

Peter Caspers-4
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.

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.

best regards
   Peter

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: global optimizers

Dirk Eddelbuettel

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 | [hidden email] | http://dirk.eddelbuettel.com

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: global optimizers

Peter Caspers-4
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 <[hidden email]> 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 | [hidden email] | http://dirk.eddelbuettel.com

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev