[SciPy-Dev] diifferential_evolution - moving core loop of solve method into a generator function

Aidan Macdonald aidan at brightcloud.com
Mon Dec 14 13:13:20 EST 2015


On Sun, Dec 13, 2015 at 4:37 PM, Andrew Nelson <andyfaff at gmail.com> wrote:

> Dear devs,
> I'd like to submit a PR to extract the population evolving loop in the
> DifferentialEvolutionSolver.solve method (currently ~L500 in
> _differentialevolution.py), and put it into a generator function
> (called evolve). This means that the population evolution would occur
> by the solve method advancing the evolve generator repeatedly.
>
> This would not appear to have any use if one is calling the
> differential_evolution function. However, if one uses the
> DifferentialEvolutionSolver class then you could:
>
> 1) Inspect the population after every evolved generation (if you call
> the evolve generator directly, instead of through solve). You can then
> apply your own convergence criterion to the optimization.
> 2) it breaks up the solve method into smaller pieces.
>
Could this perhaps allow for parallelization? Last I checked, Differential
Evolution wasn't parallelized in Scipy. I wrote my own version
<http://acsweb.ucsd.edu/~amacdona/notes/MachineLearning/mpi_differential_evolution.py>
because
I needed MPI Parallelization.

3) for me it's a little more pythonic.
>
> Comments, questions?
>
I support this change, and especially if I would be able to parallelize my
optimization via MPI.


> _____________________________________
> Dr. Andrew Nelson
>
>
> _____________________________________
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> https://mail.scipy.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20151214/7e70e3c8/attachment.html>


More information about the SciPy-Dev mailing list