2
$\begingroup$

A simple question: what is the meaning of the standard option (Automatic) for SearchPoints within the DifferentialEvolution method?

I see in the Mathematica help that SearchPoints -> Automatic has different meanings depending on the method for global optimization, say for RandomSearch it is "min(10 d,100), where d is the number of variables". For SimulatedAnnealing it is min(2 d,50). And for DifferentialEvolution? The same help page (whose title is "Numerical Nonlinear Global Optimization" does not explain this).

$\endgroup$

2 Answers 2

3
$\begingroup$

Using Trace we find that default value of the suboption "SearchPoints" is Min[10 d, 50]:

Trace[NMinimize[{y + x + (1 - x)^2, x^2 + y^2 <= 1}, {x, y}, 
  Method -> {"DifferentialEvolution"}], 
 _[Optimization`NMinimizeDump`searchpoints, _], TraceInternal -> True]

{{{{{{{{{{{{{{{{{{{{{{{{Optimization`NMinimizeDump`searchpoints = If[Optimization`NMinimizeDump`initpts === Automatic, Min[10 Optimization`NMinimizeDump`dim, 50], Max[Min[10 Optimization`NMinimizeDump`dim, 50], Length[Optimization`NMinimizeDump`initpts]]], Optimization`NMinimizeDump`searchpoints = 20}}}}}}}}}}}}}}}}}}}}}}}}

The variable name Optimization`NMinimizeDump`searchpoints is found by searching for the term "SearchPoints" in the huge output from

Trace[NMinimize[{y + x + (1 - x)^2, x^2 + y^2 <= 1}, {x, y}, 
  Method -> {"DifferentialEvolution"}], TraceInternal -> True]`.
$\endgroup$
1
$\begingroup$

Option processing may also be inspected in optionCheck[]:

Needs@"GeneralUtilities`";
PrintDefinitions@Optimization`NMinimizeDump`optionCheck

Optimization`NMinimizeDump`optionCheck[
 NMinimize`DifferentialEvolution, caller_, l,_] :=
  ...
  If[SameQ[searchpoints, Automatic],
        searchpoints = If[
                SameQ[initpts, Automatic],
                Min[10 * dim, 50],
                Max[Min[10 * dim, 50], Length @ initpts]
            ]
    ];
  ...
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.