Questions tagged [shgo]

11 questions
5
votes
0 answers

scipy's shgo optimizer fails to minimize variance

In order to get familiar with global optimization methods and in particular with the shgo optimizer from scipy.optimize v1.3.0 I have tried to minimize the variance var(x) of a vector x = [x1,...,xN] with 0 <= xi <= 1 under the constraint that x has…
TMueller83
  • 412
  • 3
  • 11
3
votes
2 answers

SciPy: Issue passing arguments to optimize.shgo function

I am trying to use the SHGO algorithm implemented in SciPy, but I have trouble when the objective function takes more than one argument. If I understand the error correctly, I am not passing the additional arguments (parameters) to the objective…
AB8
  • 51
  • 6
2
votes
1 answer

Possible bug in SciPy shgo (Unexpected TypeError)

When running the following from scipy.optimize import rosen, rosen_der, rosen_hess bounds = [(0,1.6), (0, 1.6), (0, 1.4), (0, 1.4), (0, 1.4)] result = scipy.optimize.shgo(rosen, bounds, options={'jac':rosen_der,'hess':rosen_hess}) I get TypeError:…
Kvothe
  • 233
  • 1
  • 8
1
vote
2 answers

Parallelization of Scipy shgo optimizer

I am trying to optimize 8 parameters for my model using optimizer, but I am struggling with slow speed of the Scipy-shgo optimizer. opt = shgo( objective_function, # per-loop callee ? [ns/call] bounds =…
1
vote
3 answers

Optimization boundaries and constraints are not accepted

I'm trying to use the shgo algorithm to run simulations (black box problem) and maximize the output parameter of the simulation. The objective functions runs and evaluates the simulation. I have 5 variables as input. I need to define boundaries and…
loco39
  • 11
  • 1
1
vote
0 answers

SHGO doesn't take equality constraints into account

I'm trying to understand how shgo has to be used. In the following example, I would expect that no solution can be found, because the constraint function always returns 1.0 even though it's supposed to be equal to zero. However, shgo terminates…
Christopher
  • 2,005
  • 3
  • 24
  • 50
0
votes
0 answers

How can I control the accuracy of the input parameters into the shgo-algorithm

I realized that during the optimization using shgo-algorithm, especially in the local optimization, the algorithm choses very small (e-10) steps by changing the input parameter. Ist there a command to change this to 0.1? As my range is between 50…
loco39
  • 11
  • 1
0
votes
2 answers

Possible bug with scipy.optimize SHGO sobol: TypeError: () takes 1 positional argument but 3 were given

I have been trying to perform some global optimization with SciPy optimizer SHGO and I've had issues with the sampling metod 'sobol'. Specifically, I get an error of the type: TypeError: () takes 1 positional argument but 3 were given. The…
0
votes
0 answers

What is the difference between SHGO and Nevergrad optimization technique?

I am currently trying to find some use cases to differentiate between the two optimization techniques i.e. Nevergrad (PSO) and SHGO. or which is more useful. Please help me with this..
0
votes
1 answer

Global minimum of a function with binary entries

I need to find the global minimum of a function F(x_1, x_2, ...) whose entries can take only two possible values, 0 and 1. I'm trying to use scipy.optimize.shgo like this optimize.shgo( F , bounds, args= args , constraints=cons) but I don't know…
danuzco
  • 55
  • 8
0
votes
0 answers

Restrict SciPy optimization to integers

I'm using SciPy's optimization functions (in particular shgo()) in order to optimize my problem. Right now I'm managing to get a valid solution, however I would like to improve this a little bit. My function is solving a NLU problem. Basically, I…
Rémy
  • 9
  • 2