0
$\begingroup$

I am comparing some code for non-linear function minimization in multiple variables, like quasi-Newton methods etc. I am looking for a nice function to use as a test case.

So far I have been using $f(\bf x) = \frac{1}{2} {\bf x}^T A {\bf x}$ where $\bf A$ is a random symmetric positive definite matrix. This is nice because I can easily compute the gradient and Hessian and condition number. However it is too easy.

I'm looking for a function of two or more variables where one can analytically compute the gradient and Hessian. It does not need to be convex, so long as I can start the minimization with an initial point so that simple gradient descent will find a well known minimum. Ideally I'd like the function to have a narrow valley that is curved and not a straight shot from the starting point to the minimum, so I can test how well algorithms deal with following such narrow valleys without excessive zig zagging function evaluations.

$\endgroup$
3
  • $\begingroup$ Ooh thats pretty good... $\endgroup$
    – Robotbugs
    Mar 15, 2015 at 2:02
  • $\begingroup$ Shame you didn't put those in an answer. Great pointer! $\endgroup$
    – Robotbugs
    Mar 15, 2015 at 22:11
  • $\begingroup$ I don't understand to whom you are answering and what pointer you are speaking about ? Has an answer been cancellated ? $\endgroup$
    – Jean Marie
    Jul 6, 2016 at 22:10

3 Answers 3

1
$\begingroup$

Peter Spellucci's test cases for DONLP2. The documents on that page provide both text examples and the results from DONLP2, so you can check your answers against his. Many of his examples are constrained optimization problems, but quite are few are not, so they should be usable.

One interesting example is the Rosenbrock "banana" function $$ f(x,y) = (1 - x)^2 + 100 (y - x^2)^2 $$ Oh -- I see that this function was already mentioned in the comment above. I'll leave it here in my answer, anyway, because I don't think the site's search function looks at comments.

You can compare your results with Mathematica here.

$\endgroup$
1
$\begingroup$

Wikipedia has a nice list of test functions for optimization, including "long valley" variations as well as functions with several local minima, sometimes separated by steep walls.

$\endgroup$
-1
$\begingroup$

Here, a list of functions, given the shape, you can see, it's difficult to optimize.....

Griewank Function: http://i.stack.imgur.com/8dLq0.png

Kursawe Function: http://i.stack.imgur.com/qvrBD.png

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.