Minimization is a subclass of mathematical optimization where given a cost or objective function, the goal is to choose the best set of parameters that will minimize the value given by this function.
Questions tagged [minimization]
529 questions
1
vote
1 answer
Algorithm to minimize vertical sum of binned rows
I have a problem that I am trying to find an algorithm for. I'd appreciate any suggestions.
I have n rows of length m. The rows have binary (0,1) values that have some expected sum. The 1's can be placed anywhere in its row as long as the sum is as…

kstisser
- 13
- 4
1
vote
1 answer
Most efficient computational method to numerically minimize a 8 variables constrained system
I'm working for quite some time on finding a numerical instance for solution of a 8 variables system of 7 very complicated inequalities plus region specification. Unfortunately I cannot produce a MWE or nothing of the sort since the inputs are…

GaloisFan
- 111
- 5
1
vote
1 answer
Function minimization using minimize from scipy
I would like to minimize the following cost function
where h_u and h_v are the vectors of real numbers.
I am doing this in Python, but I am not sure that the function minimize from scipy.optimize package is what I need.
My approach is the…

Python
- 359
- 2
- 16
1
vote
2 answers
Pass additional parameters to an objective function
I am trying to solve a minimization problem following this structure:
res=minimize(objective_fnc, x0, args=param, method='Nelder-Mead)
I need to pass a series of arguments that are not par of the optimization variables but parameters to change the…

nekovolta
- 496
- 2
- 14
1
vote
1 answer
How to use Boost's Brent minimization algorithm with a specific tolerance rather than bits?
The documentation for the brent_find_minima function is at https://www.boost.org/doc/libs/1_76_0/libs/math/doc/html/math_toolkit/brent_minima.html
template
std::pair brent_find_minima(F f, T min, T max, int…

bradgonesurfing
- 30,949
- 17
- 114
- 217
1
vote
0 answers
Find the optimal value from a Residual function
I have two functions,
f(x), f(x,a)
I can plot x-f(x) and x-f(x,a) for a family of a values.
Now I want to know for which value of a does the residual becomes minimum, that f(x)~f(x,a) for a will be minimum.
Both f(x) and f(x,a) returns an array for…

Ayan Mitra
- 497
- 1
- 8
- 20
1
vote
0 answers
Global minimization of multivariable with scipy.optimize.brute
I'm trying to minimize the following function:
with respect to the parameters H and alpha using the brute force method, specifically the scipy.optimize.brute algorithm. The problem arises that I don't know how to deal with this unknown number of…

Mateus Forcelini
- 121
- 8
1
vote
0 answers
A logarithmic constraint using fmincon in MATLAB
I want to minimize the following minimization problem using fmincon in MATLAB
The code below (Strategy 1) that I have written solves the problem when I replace the logarithmic (nonlinear) constraint by the linear constraint sum(x) = 5. So how can I…

Christina
- 903
- 16
- 39
1
vote
0 answers
Specify (multi)parameter limits with iminuit
I have tried to set limits on parameters using iminuit with the example code:
import iminuit
def func(x,y):
fun = 2*x**2 + 3*y + 5
return fun
m = iminuit.Minuit(func, x=1, y=1, limit_x=(0,100), limit_y=(0,50))
What I get is the error…

Marcos
- 57
- 5
1
vote
2 answers
Minimizing discontinuous function in R
I have a 600 x 500 Boolean array data, where the cells represent geographical 0.1' x 0.1' grid cells covering much of Europe. The TRUE cells are those grid cells where (according to my weather simulations) a certain chemical substance should be…

Drubbels
- 327
- 2
- 4
- 11
1
vote
3 answers
Why would my minimum search (steepest decent) climb a hill?
I'm trying to minimize a discretized function using a method of steepest decent. This should be fairly straightforward, but I'm having trouble with the search 'climbing' out of any local minimum. Here's my code in Mathematica, but its syntax is easy…

John Matok
- 157
- 1
- 12
1
vote
6 answers
Minimize sum of product of two uneven consecutive arrays
I've got an optimization problem in which I need to minimize the sum product of two uneven but consecutive arrays, say:
A = [1, 2, 3]
B = [4, 9, 5, 3, 2, 10]
Shuffling of values is not allowed i.e. the index of the arrays must remain the same.
In…

Jules van Dijk
- 11
- 1
1
vote
2 answers
Optimization in Julia with Optim.jl - How do I get rid of this error?
newbie here
I'm trying to minimize a function in Julia with optim.jl. The function works, but when I try to optimize it it gives me this error message:
MethodError: no method matching -(::Float64, ::Array{Float64,1})
For element-wise subtraction,…

user14951148
- 13
- 4
1
vote
1 answer
Not enough input arguments error in matlab fmincon optimization
I'm new to MATLAB and I need help to solve this optimization problem. Here is the objective function m file:
function f = objfun(x,w1,w2)
w = 6:1:125;
z1 = x(4).*((x(1).*(1i.^2).*w.^2)+(x(5).*1i.*w)+x(3));
z2 =…

Tony
- 76
- 6
1
vote
2 answers
Create SAS table using PROC OPTMODEL
I need to transform the output from PROC OPTMODEL in a SAS table.
Browsing on the internet, I found it is possible to do that by using the CREATE DATA statement in the PROC OPTMODEL.
Specifically, I'm tryng to solve an optimization problem that aims…

QuantumGorilla
- 583
- 2
- 10
- 25