1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Additional documentation for the optim package for Octave.
Copyright (C) Olaf Till <i7tiol@t-online.de>
You can redistribute this documentation and/or modify it under the terms
of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any
later version.
This documentation is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with this documentation; if not, see <http://www.gnu.org/licenses/>. -->
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>de_min (optim_doc)</title>
<meta name="description" content="de_min (optim_doc)">
<meta name="keywords" content="de_min (optim_doc)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html#Top" rel="start" title="Top">
<link href="Function-index.html#Function-index" rel="index" title="Function index">
<link href="Scalar-optimization.html#Scalar-optimization" rel="up" title="Scalar optimization">
<link href="battery.html#battery" rel="next" title="battery">
<link href="line_005fmin.html#line_005fmin" rel="prev" title="line_min">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<a name="de_005fmin"></a>
<div class="header">
<p>
Next: <a href="battery.html#battery" accesskey="n" rel="next">battery</a>, Previous: <a href="line_005fmin.html#line_005fmin" accesskey="p" rel="prev">line_min</a>, Up: <a href="Scalar-optimization.html#Scalar-optimization" accesskey="u" rel="up">Scalar optimization</a> [<a href="Function-index.html#Function-index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="A-differential-evolution-_0028stochastic_0029-optimizer"></a>
<h3 class="section">1.16 A differential evolution (stochastic) optimizer</h3>
<a name="index-de_005fmin"></a>
<a name="Helptext_003a-5"></a>
<h4 class="subheading">Helptext:</h4>
<a name="XREFde_005fmin"></a><pre class="verbatim">de_min: global optimisation using differential evolution
Usage: [x, obj_value, nfeval, convergence] = de_min(fcn, control)
minimization of a user-supplied function with respect to x(1:D),
using the differential evolution (DE) method based on an algorithm
by Rainer Storn (http://www.icsi.berkeley.edu/~storn/code.html)
See: http://www.softcomputing.net/tevc2009_1.pdf
Arguments:
---------------
fcn string : Name of function. Must return a real value
control vector : (Optional) Control variables, described below
or struct
Returned values:
----------------
x vector : parameter vector of best solution
obj_value scalar : objective function value of best solution
nfeval scalar : number of function evaluations
convergence : 1 = best below value to reach (VTR)
0 = population has reached defined quality (tol)
-1 = some values are close to constraints/boundaries
-2 = max number of iterations reached (maxiter)
-3 = max number of functions evaluations reached (maxnfe)
Control variable: (optional) may be named arguments (i.e. "name",value
---------------- pairs), a struct, or a vector, where
NaN's are ignored.
XVmin : vector of lower bounds of initial population
*** note: by default these are no constraints ***
XVmax : vector of upper bounds of initial population
constr : 1 -> enforce the bounds not just for the initial population
const : data vector (remains fixed during the minimization)
NP : number of population members
F : difference factor from interval [0, 2]
CR : crossover probability constant from interval [0, 1]
strategy : 1 --> DE/best/1/exp 7 --> DE/best/1/bin
2 --> DE/rand/1/exp 8 --> DE/rand/1/bin
3 --> DE/target-to-best/1/exp 9 --> DE/target-to-best/1/bin
4 --> DE/best/2/exp 10--> DE/best/2/bin
5 --> DE/rand/2/exp 11--> DE/rand/2/bin
6 --> DEGL/SAW/exp else DEGL/SAW/bin
refresh : intermediate output will be produced after "refresh"
iterations. No intermediate output will be produced
if refresh is < 1
VTR : Stopping criterion: "Value To Reach"
de_min will stop when obj_value <= VTR.
Use this if you know which value you expect.
tol : Stopping criterion: "tolerance"
stops if (best-worst)/max(1,worst) < tol
This stops basically if the whole population is "good".
maxnfe : maximum number of function evaluations
maxiter : maximum number of iterations (generations)
The algorithm seems to work well only if [XVmin,XVmax] covers the
region where the global minimum is expected.
DE is also somewhat sensitive to the choice of the
difference factor F. A good initial guess is to choose F from
interval [0.5, 1], e.g. 0.8.
CR, the crossover probability constant from interval [0, 1]
helps to maintain the diversity of the population and is
rather uncritical but affects strongly the convergence speed.
If the parameters are correlated, high values of CR work better.
The reverse is true for no correlation.
Experiments suggest that /bin likes to have a slightly
larger CR than /exp.
The number of population members NP is also not very critical. A
good initial guess is 10*D. Depending on the difficulty of the
problem NP can be lower than 10*D or must be higher than 10*D
to achieve convergence.
Default Values:
---------------
XVmin = [-2];
XVmax = [ 2];
constr= 0;
const = [];
NP = 10 *D
F = 0.8;
CR = 0.9;
strategy = 12;
refresh = 0;
VTR = -Inf;
tol = 1.e-3;
maxnfe = 1e6;
maxiter = 1000;
Example to find the minimum of the Rosenbrock saddle:
----------------------------------------------------
Define f as:
function result = f(x);
result = 100 * (x(2) - x(1)^2)^2 + (1 - x(1))^2;
end
Then type:
ctl.XVmin = [-2 -2];
ctl.XVmax = [ 2 2];
[x, obj_value, nfeval, convergence] = de_min (@f, ctl);
Keywords: global-optimisation optimisation minimisation
</pre>
<hr>
<div class="header">
<p>
Next: <a href="battery.html#battery" accesskey="n" rel="next">battery</a>, Previous: <a href="line_005fmin.html#line_005fmin" accesskey="p" rel="prev">line_min</a>, Up: <a href="Scalar-optimization.html#Scalar-optimization" accesskey="u" rel="up">Scalar optimization</a> [<a href="Function-index.html#Function-index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|