Questions tagged [differential-evolution]

In computer science, differential evolution (DE) is a method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality. It's similar to genetic algorithm (GA) except that the candidate solutions are not considered as binary strings (chromosome) but (usually) as real vectors.

DE is used for multidimensional real-valued functions but does not use the gradient of the problem being optimized, which means DE does not require for the optimization problem to be differentiable as is required by classic optimization methods such as gradient descent and quasi-newton methods. DE can therefore also be used on optimization problems that are not even continuous, are noisy, change over time…

DE optimizes a problem by maintaining a population of candidate solutions and creating new candidate solutions by combining existing ones according to its simple formulae, and then keeping whichever candidate solution has the best score or fitness on the optimization problem at hand. In this way the optimization problem is treated as a black box that merely provides a measure of quality given a candidate solution and the gradient is therefore not needed.

DE is originally due to Storn and Price

See also:

103 questions
1
vote
0 answers

Is there something wrong with my crossover function?

I am coding differential evolution on python and I sometimes(very rarely) get the error of too many recursive calls. I want to improve on coding functions so thought this was a good place to ask. I initialize a mutant vector in another function and…
mayank
  • 176
  • 1
  • 12
1
vote
1 answer

Speed up the differental evolution algorithm with thousands of parameters

I am trying to make a lumped rainfall-runoff balance model with a lot parameters (from 37 to 1099) in python. As input it will receive daily rainfall and temperature data and then provides output as a daily flows. I am stuck on the optimisation…
roPe
  • 26
  • 6
1
vote
1 answer

Parameter optimization for system of ODEs using scipy.differential_evolution fails due to solve_ivp throwing runtime_warnings

I'm trying to solve a model in python and to fit unknown parameters of the model to experimental data. The model consists of 2 ODEs and I solve it using scipy.integrate.solve_ivp. The parameters of the model are unknown, so, I want to fit them using…
1
vote
1 answer

What are 'population energies'?

In scipy.optimize.differential_evolution, the convergence criteria are that: the solving stops when np.std(population_energies) <= atol + tol * np.abs(np.mean(population_energies)) where atol and tol are the absolute and relative tolerance…
1
vote
0 answers

SciPy Differential Evolution: doesn't run on multiple cores even if workers = -1

Context: I'm developing an optimizer by using SciPy's differential evolution package. I get some good results with worker = 1, but I would like to speed up the runtime. I checked the following thread already regarding How to enable parallel in…
1
vote
1 answer

Stop Scipy differential_evolution() after a time threshold

My question has already been partially answered here. I just need to extend the answer to another Scipy function. (Scipy 1.4.0, Python 3.7 on Windows 10) Referring to the answer given by @ali_m, I tried to apply the same idea to the…
RF7
  • 13
  • 4
1
vote
1 answer

python scipy differential evolution optimization fails with workers not 1

I am trying to use the workers parameter of the scipy differential evolution algo. When I put it as 1, my script runs with no issues. If I put something different, it fails with the following traceback : Traceback (most recent call last): File…
Chapo
  • 2,563
  • 3
  • 30
  • 60
1
vote
1 answer

Using genetic algorithm in a function (locally) - minimizing function

I have been trying to use the genetic algorithm in order to fit my power law in different experiments. And the problem is that I do not really understand it completely. I think I understand everything but the sumOfSquaredError(parameterTuple)…
1
vote
1 answer

Shape of init parameter in scipy.optimize differential evolution

I do not understand the shape that the algorithm is expecting for the init parameter. In the help, it says : init str or array-like, optional Specify which type of population initialization is performed. Should be one…
Chapo
  • 2,563
  • 3
  • 30
  • 60
1
vote
3 answers

How to pass arguments to callback function in scipy.optimize.differential_evolution

I am using differential_evolution from scipy.optimize for my optimization problem. My optimizer takes some arguments for the optimization. Code - res = optimize.differential_evolution(objective,bounds,args=arguments,disp=True,callback =…
chink
  • 1,505
  • 3
  • 28
  • 70
1
vote
0 answers

Struggling to implement a differential evolutionary algorithm from a paper in python3 with DEAP

I'm trying to implement a differential evolution algorithm to solve for the parameters of a PV model. I think the code I've written is correct, but I seem to be getting weird answers. With each run of the algorithm, I get new parameters, which vary…
1
vote
1 answer

Passing optimization function arguments in R DEoptim

I am trying to learn the DEoptim library in R but I think I am misunderstanding the library documentation from https://www.rdocumentation.org/packages/DEoptim/versions/2.2-4/topics/DEoptim I am getting the error argument "returns_covar" is missing,…
coolhand
  • 1,876
  • 5
  • 25
  • 46
1
vote
1 answer

Scipy Differential Evolution - init specifying start

Problematic code: result = differential_evolution(GA_optimisation, bounds, init=initial_GA_params, args=args) init : str or array-like, optional Specify which type of population initialization is performed. Should be one of: array specifying…
J.B
  • 11
  • 1
1
vote
1 answer

Find the correct fitness function for optimization using Differential Evolution for budgeting problem

i am building a website for recommendation system using differential evolution. The website will ask the user's budget and some criteria and will return the optimal package. The data field look like this and i have 8 dimensions (tables). Id | Name…
1
vote
1 answer

Differential evolution in SciPy

I am trying to use differential_evolution from SciPy. I have three matrices: x, y and P - all of size (14,6). I have to use the following formula: z= np.log10(g)+ np.log10(c)*np.log10(P) to find the value of c (real number from 0 to 2) which…