Scilab Function

cma_optim - functional interface to the CMA-ES optimizer, a (stochastic) non-convex function minimizer

Calling Sequence

param = cma_optim()
param = cma_optim([])
[xopt, f, out, param] = cma_optim(costf, x0, sigma0 [, param])

Parameters

Description

The function cma_optim uses the functions cma_new() and other cma_*() funcions that implement the CMA-ES in a more object oriented way.

The CMA-ES is a stochastic optimizer. It can make perfect sense to re-run the code several times.

Examples

  getf('fitfuns.sci');    // define frosen and felli, file should be in CMA-ES-vXXX/demos
  [f x out] = cma_optim(frosen, rand(8,1), 0.3); // minimize 8-D Rosenbrock function
  disp(f)                 // display achieved function value, x is the delivered solution 

  p = cma_optim([]);      // get optional parameters
  disp(p.stop);           // lets see the possible and default termination criteria
  p.readme.stop           // lets see what the entries mean
  p.stop.fitness = 1e-9;  // set target function value (minimization)
  p.verb.plotmodulo = 0;  // turn plotting off this time
  [f x out] = cma_optim(felli, ones(15,1), 1, p);  // minimize 15-D hyper-ellipsoid function

  disp(out.solutions.bestever.f);    // show the best-ever function value
  disp(felli(out.solutions.mean.x)); // might be an even better solution
  cma_plot;               // let's finally plot the run 

  

See Also

cma_new ,   cma_plot ,   cma_optim_restarted ,   optim ,  

Authors

Nikolaus Hansen

Bibliography

Used Function

cma_new() cma_ask() cma_tell() ...