[SciPy-Dev] Using global minimizer methods from `optimize.minimize` function

Andrew Nelson andyfaff at gmail.com
Thu Apr 30 00:43:32 EDT 2020


On Thu, 30 Apr 2020 at 14:25, Ralf Gommers <ralf.gommers at gmail.com> wrote:

>
>
> On Thu, Apr 30, 2020 at 4:43 AM Andrew Nelson <andyfaff at gmail.com> wrote:
>
>>
>> But, I think there is another concern that may not have been expressed
>>> yet. `x0` is a required, positional argument for `minimize()`, as an array
>>> of initial parameter values.   Most of the global optimizers in
>>> scipy.optimize do not use `x0`.  Instead, they require bounds and explore
>>> the range of values between those bounds.   Would `x0` be required AND
>>> ignored for these global optimizers?
>>>
>>
>> The call signature for required positional arguments for `minimize` is
>> different to the global optimizers. Being able to call the global
>> minimizers via `minimize` would alleviate that. As you say the global
>> minimizers do explore within bounds, and don't use an `x0`. The PR (as it
>> currently exists) would still require `x0`, and it would be ignored.
>> It would be possible to change that behaviour for
>> `differential_evolution`, but would require the modification of the code to
>> accept an `x0` keyword.
>>
>
> Hmm, the signature issue seems quite problematic. The opposite is also
> true: `bounds` is optional for minimize(), and cannot be made non-optional,
> however for the global optimizers it is required.
>


The call would be:
```
minimize(func, x0, bounds=bounds, method='differential-evolution')
```
Inside `minimize` it would look something like:
```
res = differential_evolution(func, bounds)
```

If bounds is None then an error would be raised, either from the `minimize`
function or the underlying `differential_evolution` function.
At the moment the x0 supplied to minimize would be ignored by the
underlying de function, but it would be possible to amend de to use x0 as
well.

With this proposal the minimize signature wouldn't change, neither would
that of `differential_evolution` (with the possible exception of adding an
`x0` keyword to use an initial position).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20200430/54ee3562/attachment.html>


More information about the SciPy-Dev mailing list