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
6
votes
1 answer
Minimize matrix in Equation using OpenCV
I need to minimize H in following equation:
Where H is 3x3 Matrix.
Pn is 3x1 matrix (point).
Euclidean() gives distance between 2 points.
Dn is the actual distance.
I have one initial estimate of H and m points(P0 to Pm)
I need optimize value of…

Deepak
- 1,038
- 5
- 17
- 44
6
votes
1 answer
Minimum area calculation algorithm (Place tiles on edge only)
I have different dimension of small rectangles (1cm x 2xm, 2cmx3cm, 4cm*6cm etc). The number of different type rectangles may vary depending on case. Each type of different rectangles may have different number of counts.
I need to create a big…

Charles Tang
- 187
- 3
- 15
6
votes
1 answer
scipy.optimize show all iteration input and output values
I am using scipy.optimize.minimize to find the optimum value from a function. Here is the simplest example, using the built-in Rosenbrock function:
>>> from scipy.optimize import minimize, rosen
>>> x0 = [1.3, 0.7, 0.8, 1.9, 1.2]
>>> # Minimize…

feedMe
- 3,431
- 2
- 36
- 61
6
votes
3 answers
Quickly finding the first point at which a function equals 0 using scipy.optimize
Basically, given a function that produces outputs like this for different parameters:
I want to quickly find the first x at which the function equals 0. So with parameters that produce the blue curve over x, I want to find x=134. For the green…

endolith
- 25,479
- 34
- 128
- 192
6
votes
8 answers
Minimization of f(x,y) where x and y are integers
I was wondering if anyone had any suggestions for minimizing a function, f(x,y), where x and y are integers. I have researched lots of minimization and optimization techniques, like BFGS and others out of GSL, and things out of Numerical Recipes.…

Tim
- 361
- 1
- 5
- 14
5
votes
2 answers
can ranges min recalculations be avoided
Goal is to minimize a function over a range of input values. Performance matters.
Unfortunately, the ranges::min() algorithm recomputes the output for the live optimum over and over again.
It seems like the algorithm could cache the output value…

Ludovic Aubert
- 9,534
- 4
- 16
- 28
5
votes
1 answer
Scheduling optimization to minimize the number of timeslots (with constraints)
I'm working on a scheduling optimization problem where we have a set of tasks that need to be completed within a certain timeframe.
Each task has a schedule that specifies a list of time slots when it can be performed. The schedule for each task can…

ldwii
- 112
- 7
5
votes
1 answer
Finding local maxima and minima of user defined functions
What I want
I want to find a list of the stationary points, of their values and locations, and of whether they are minima or maxima.
My function looks like:
import numpy as np
def func(x,y):
return (np.cos(x*10))**2 +…

SuperCiocia
- 1,823
- 6
- 23
- 40
5
votes
1 answer
Equivalent of MATLAB's patternsearch in Python/SciPy?
I am looking for a Python equivalent of MATLAB's patternsearch optimization algorithm. I ran through the SCiPy documentation but did not find something similiar.
Do you know whether there is some patternsearch algorithm available in Python/SciPy? Do…

Sven Rüberg
- 151
- 3
5
votes
1 answer
Python - Minimizing Chi-squared
I have been trying to fit a linear model to a set of stress/strain data by minimizing chi-squared. Unfortunately using the code below is not correctly minimizing the chisqfunc function. It is finding the minimum at the initial conditions, x0, which…

Will282
- 53
- 1
- 1
- 5
5
votes
1 answer
minimizing total path cost with obstacles and spatial constraints
I have a network of nodes arranged on a 2D Grid. I want to connect pairs of nodes with connections that will then occupy physical space on the 2D grid. The connections are now obstacles themselves and future connections will have to take a path that…

ddriver1
- 723
- 10
- 18
5
votes
1 answer
Minimization of L1-Regularized system, converging on non-minimum location?
This is my first post to stackoverflow, so if this isn't the correct area I apologize. I am working on minimizing a L1-Regularized System.
This weekend is my first dive into optimization, I have a basic linear system Y = X*B, X is an n-by-p matrix,…

Joe St Amand
- 145
- 5
4
votes
1 answer
Is there an algorithm for multi-level logic minimization?
I need an algorithm that, when given any number of boolean expressions, with any number of variables, can do multi-level logic minimization to give a set of boolean functions.
Wikipedia briefly mentions multi-level representations and gives an…

Nathan Comer
- 41
- 4
4
votes
1 answer
Minimum cost of swapping chars in string so no 3 same are consecutive
I have a string containing only two char values: 'a' or 'b'. A char can be swapped in for the other char value. Each char in the string has an associated cost with swapping it. I need to find the minimum cost of swaps such that there are no 3…

Tom Finet
- 487
- 1
- 7
- 21
4
votes
0 answers
How to create callable jacobian function for scipy minimize routine?
I can use scipy to perform minimization without using a callable jacobian. I would like to use the callable jacobian, but cannot figure out the correct structure of the output of such a function. I have checked online for examples; the similar…
user10121139