2D discrete function minimization if extreme points are known, using Matlab

In summary, the conversation is about minimizing a function for a discrete 2D grid with known extreme points (ridges). The speaker is using a smoothness function to reconstruct the function and is currently using fmincon, but it is taking too long on larger grids. They have tried using a defined gradient and Hessian, as well as sparse matrices and 'lbfgs' for the Hessian, but are seeking suggestions on how to make the process faster.
  • #1
andreass
16
0
Hello everyone.

I would like to hear some suggestions on minimizing a function.
I have discrete 2D function (a grid, where each (x,y) point have some value), where I know only extreme points (more specifically - ridges. http://en.wikipedia.org/wiki/Ridge_detection).

I want to reconstruct this function just from these points by minimizing "smoothness function" (or cost function?).
My smoothness function looks like this:
Code:
sum[ ( 4*f(x,y) - f(x-1,y) - f(x+1,y) - f(x,y-1) - f(x, y+1) )^2 ]
for all points (x, y) in the grid (of course in border and corner points it's (3*f(x, y) - ...)^2 and (2*f(x, y) - ...)^2 ).

I use fmincon by passing all extreme point values (as a vector) and upper and lower bounds. It works good and converges very good, but it takes much too long on minimizing grids that are bigger than 100x100.

Providing outside defined gradient and Hessian seems to help to converge, but runtime gets even much greater due to the many calculations.

I also use use sparse matrices and set Hessian to 'lbfgs', but it helps to certain size.

Any suggestions on how to make it run faster?
 
Physics news on Phys.org
  • #2
Maybe there is an alternative way to minimize this function? Or maybe there is a better way to define the smoothness function? Or maybe there are some specific settings to fmincon that I didn't consider?Thanks in advance!
 

1. What is 2D discrete function minimization?

2D discrete function minimization is a mathematical process used to find the minimum value of a function with two independent variables, where the function is only defined at specific points on a grid. This is often used in optimization problems where the function represents a cost or objective that needs to be minimized.

2. How do I know the extreme points of a 2D discrete function?

The extreme points of a 2D discrete function can be found by plotting the function on a grid and identifying the points with the lowest and highest values. These are also known as the minimum and maximum values of the function.

3. What is the benefit of using Matlab for 2D discrete function minimization?

Matlab is a powerful software tool that allows for efficient and accurate computation of mathematical problems, including 2D discrete function minimization. It has built-in functions and algorithms specifically designed for optimization problems, making it a popular choice for scientists and engineers.

4. Can 2D discrete function minimization be used for real-world applications?

Yes, 2D discrete function minimization can be used in various real-world applications, such as in engineering, economics, and computer graphics. It can be used to optimize designs, minimize costs, and improve performance by finding the best values for the independent variables.

5. Is 2D discrete function minimization a guaranteed method for finding the global minimum?

No, 2D discrete function minimization is not a guaranteed method for finding the global minimum. It can only find the minimum value within the given grid points. To ensure the global minimum is found, the grid points must be chosen carefully and the function must be well-behaved.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
996
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
860
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
14
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • Programming and Computer Science
Replies
3
Views
352
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
Back
Top