DEoptim               package:DEoptim               R Documentation

_D_i_f_f_e_r_e_n_t_i_a_l _E_v_o_l_u_t_i_o_n _O_p_t_i_m_i_z_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Performs evolutionary optimization via the Differential Evolution
     algorithm.

_U_s_a_g_e:

     DEoptim(FUN, lower, upper, control = list(), ...)

_A_r_g_u_m_e_n_t_s:

     FUN: A function to be minimized, with first argument the vector of
          parameters over which minimization is to take place. It
          should return a scalar result.

lower, upper: Bounds on the variables.

 control: A list of control parameters. See *Details*.

     ...: Further arguments to be passed to 'FUN'.

_D_e_t_a_i_l_s:

     'DEoptim' performs minimization of 'FUN'.

     The 'control' argument is a list that can supply any of  the
     following components:

     '_V_T_R' The value to be reached. The optimization process  will stop
          if either the maximum number of iterations 'itermax' is
          reached or the best parameter vector 'bestmem' has found a
          value 'FUN(bestmem) <= VTR'. Defaults to '10e-6'.

     '_i_t_e_r_m_a_x' The maximum iteration (population generation) allowed.
          Defaults is '200'.

     '_N_P' Number of population members. Defaults to '50'.

     '_F' Stepsize from interval [0,2]. Defaults to '0.8'.

     '_C_R' Crossover probability from interval [0,1]. Defaults to '0.5'.

     '_s_t_r_a_t_e_g_y' Defines the DE-strategy used in the optimization
          process:

          '_1' best/1/exponential

          '_2' rand/1/exponential

          '_3' rand-to-best/1/exponential

          '_4' best/2/exponential

          '_5' rand/2/exponential

          '_6' best/1/binomial

          '_7' rand/1/binomial

          '_8' rand-to-best/1/binomial

          '_9' best/2/binomial

          '_1_0' rand/2/binomial

          Experiments suggest that binomial likes to have a slightly
          larger 'CR' than exponential. By default 'strategy' is '7'.

     '_r_e_f_r_e_s_h' The frequency of reports. Defaults to every '10'
          iterations.

_V_a_l_u_e:

     A list of class 'DEoptim' with the attributes 'optim' and 'member'
     containing the following elements: 

'optim$bestmem': The best set of parameters found.

'optim$bestval': The value of 'FUN' corresponding to 'bestmem'.

'optim$nfeval': Number of function evaluations.

'optim$iter': Number of procedure iterations.

'member$lower': The lower boundary.

'member$upper': The upper boundary.

'member$bestvalit': The best value at each iteration.

'member$bestmemit': The best member at each iteration.

_N_o_t_e:

     'DEoptim' is a R-vectorized variant of the Differential Evolution
     algorithm initialy developed by R. Storn storn@icsi.berkeley.edu,
     International Computer Science Institute (ICSI), 1947 Center
     Street, Suite 600, Berkeley, CA 94704. <URL:
     http://http.icsi.berkeley.edu/~storn>.

     If you experience misconvergence in the optimization process you
     usually  have to increase the value for 'NP', but often you only
     have to adjust  'F' to be a little lower or higher than '0.8'. If
     you increase  'NP' and simultaneously lower 'F' a little,
     convergence is more  likely to occur but generally takes longer,
     i.e. 'DEoptim' is getting  more robust (there is always a
     convergence speed/robustness tradeoff).

     'DEoptim' is much more sensitive to the choice of 'F' than it is
     to the choice of 'CR'. 'CR' is more like a fine tuning element.
     High  values of 'CR' like 'CR=1' give faster convergence if
     convergence occurs. Sometimes, however, you have to go down as
     much as 'CR=0' to  make 'DEoptim' robust enough for a particular
     problem. 

     If you choose binomial crossover like, rand/1/binomial, 'CR' is
     usually  higher than in the exponential crossover variant (in this
     example  rand/1/exponential). Still, 'F' and 'CR' are both
     generally in  the range [0.5,1] for most problems we have
     encountered. Keep in mind that  different problems usually require
     different settings for 'NP', 'F'  and 'CR'. 

     If you still get misconvergence you might want to try a different
     method.  We mostly use rand/1/... or best/2/... (for the latter
     'F=0.5' is the  standard choice). The crossover method is not so
     important although Ken Price  claims that binomial is never worse
     than exponential. In case of misconvergence  also check your
     choice of objective function. There might be a better one to 
     describe your problem. Any knowledge that you have about the
     problem should be  worked into the objective function. A good
     objective function can make all  the difference.

     The R-adaptation 'DEoptim' has properties which differ from the 
     original DE version:

     _1. The random selection of vectors is performed by shuffling the
          population array. Hence a certain vector cannot be chosen
          twice in the same term of the perturbation expression.

     _2. Due to the vectorized expressions 'DEoptim' executes fairly
          fast.

     _3. The parameters are constrained within boundaries.

_A_u_t_h_o_r(_s):

     D. Ardia <david.ardia@unifr.ch> for the R-port; R. Storn
     <storn@icsi.berkeley.edu> for the Differential Evolution
     algorithm.

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.icsi.berkeley.edu/~storn>

     <URL: http://www2.lut.fi/~jlampine/debiblio.htm>

     Nocedal, J. and Wright, S. J. (1999) _Numerical Optimization_.
     Springer.

     Price, K., Storn, R. and J. Lampingen (2005) _Differential
     Evolution - A Practical Approach to Global Optimization over
     Continuous Spaces_. Springer.

     Storn, R. and Price, K. (1995) Differential Evolution - a Simple
     and Efficient Adaptive Scheme for Global Optimization over
     Continuous Spaces. _Technical Report TR-95-012_.

_S_e_e _A_l_s_o:

     'DEoptim-methods' for methods on DEoptim object; 'optim' or
     'constrOptim' for constrained optimization.

_E_x_a_m_p_l_e_s:

       ## Rosenbrock Banana function
       Rosenbrock <- function(x){
       x1 <- x[1]
       x2 <- x[2]
       100 * (x2 - x1 * x1)^2 + (1 - x1)^2
       }

       lower <- c(-10,-10)
       upper <- -lower
       DEoptim(Rosenbrock, lower, upper)
       DEoptim(Rosenbrock, lower, upper, 
         control = list(NP = 100, refresh = 1))
       DEoptim(Rosenbrock, lower, upper, 
         control = list(NP = 50, itermax = 200, F = 1.5, 
         CR = 0.2, refresh = 1))
       DEoptim(Rosenbrock, lower, upper,
         control = list(NP = 80, itermax = 400, F = 1.2,
         CR = 0.7, refresh = 1))

       ## 'Wild' function, global minimum at about -15.81515
       Wild <- function(x)
         10 * sin(0.3*x) * sin(1.3*x^2) + 
            0.00001 * x^4 + 0.2 * x + 80
       plot(Wild, -50, 50, n = 1000, 
         main = "DEoptim minimizing 'Wild function'")
       DEoptim(Wild, lower = -50, upper = 50,
           control = list(NP = 50, refresh = 1))

