More-Garbow-Hillstrom test functions with first derivatives (PyOPUS subsystem name: MGH)
Translated from MATLAB implementation (with bugs omitted).
All test functions in this module are maps from to . Every function is comprised of m auxiliary functions
where x is a n-dimensional vector.
The actual test function is then constructed as
The i-th component of the function’s gradient can be expressed as
where J(x) is the Jacobian matrix of the auxiliary functions at x where the first index corresponds to the auxiliary function and the second index corresponds to the component of auxiliary function’s gradient.
An exception is the McKinnon function which is not part of the original test suite but is included here because it is a well known counterexample for the Nelder-Mead simplex algorithm. Another exception is the Gao-Han almost quadratic function.
The functions were first published as a test suite in [mgh]. Later bounds were added to most test functions in [gay].
If a function’s documentation does not say anything about bounds, the bounds are defined for all allowed values of n.
This module is independent of PyOPUS, meaning that it can be taken as is and used as a module in some other package. It depends only on the cpi module.
[mgh] | More J.J, Garbow B. S., Hillstrom K. E.: Testing Unconstrained Optimization Software. ACM Transactions on Mathematical Software, vol. 7, pp. 17-41, 1981. |
[gay] | Gay D. M., A trust-region approach to linearly constrained optimization. Numerical Analysis (Griffiths, D.F., ed.), Lecture Notes in Mathematics 1066, pp. 72-105, Springer, Berlin, 1984. |
Base class for test functions
The initial point can be obtained from the initial member. The full name of the problem is in the name member.
The xl and xh members specify the lower and the upper bound given by D. M. Gay in his paper. If they are None no known lower or upper bound is available in the literature.
Objects of this class are callable. The calling convention is
object(x, gradients)
where x is the input values vector and gradients is a boolean flag specifying whether the Jacobian should be evaluated. The values of the auxiliary functions and the jacobian are stored in the fi and J members.
To create an instance of the extended Rosenbrock function with n=m=4 and evaluate the function and the gradient at the initial point one should:
from pyopus.optimizer.mgh import ExtendedRosenbrock
rb=ExtendedRosenbrock(n=4, m=4)
(f, g)=rb.fg(rb.initial)
Returns the common problem interface.
If bounds is True the bounds defined by Gay are included. Best known minimum information is missing for some problems.
The info member of the returned dictionary is itself a dictionary with the following members:
- m - m parameter of the MGH problem
See the CPI class for more information.
Returns the value of the test function at x.
Returns a tuple of the form (f, g) where f is the function value at x and g is the corresponding value of the function’s gradient.
Returns the value of the gradient at x.
The name of the test function
A list holding references to all function classes in this module.
Rosenbrock test function (n=m=2).
See the MGH class for more details.
Freudenstein and Roth test function (n=m=2).
See the MGH class for more details.
Powell badly scaled test function (n=m=2).
See the MGH class for more details.
Brown test function (n=2, m=3).
See the MGH class for more details.
Beale test function (n=2, m=3).
See the MGH class for more details.
Jennrich and Sampson test function (n=2, m>=n).
See the MGH class for more details.
Helical valley test function (n=m=3).
See the MGH class for more details.
Bard test function (n=3, m=15).
See the MGH class for more details.
Gaussian test function (n=3, m=15).
See the MGH class for more details.
Meyer test function (n=3, m=16).
See the MGH class for more details.
Gulf research and developement test function (n=3, n<=m<=100).
See the MGH class for more details.
Box 3D test function (n=3, m>=n).
See the MGH class for more details.
Powell singular test function (n=m=4).
See the MGH class for more details.
Wood test function (n=4, m=6).
See the MGH class for more details.
Kowalik and Osborne test function (n=4, m=11).
See the MGH class for more details.
Brown and Dennis test function (n=4, m=20).
See the MGH class for more details.
Osborner 1 test function (n=5, m=33).
See the MGH class for more details.
Biggs EXP6 test function (n=6, m>=n).
See the MGH class for more details.
Osborner 2 test function (n=11, m=65).
See the MGH class for more details.
Watson test function (2<=n<=31, m=31).
Bounds defined for n=2, 9, and 12.
See the MGH class for more details.
Extended Rosenbrock test function (n=2k>=2, m=n).
See the MGH class for more details.
Extended Powell singular test function (n=4k>=4, m=n).
See the MGH class for more details.
Penalty I test function (m=n+1).
Bounds defined for n=10.
See the MGH class for more details.
Penalty II test function (m=2n).
Bounds defined for n=1, 4, and 10.
See the MGH class for more details.
Variably dimensional test function (m=n+2).
Bounds defined for n=10.
See the MGH class for more details.
Trigonometric test function (m=n).
Bounds defined for n=10.
See the MGH class for more details.
Brown almost linear test function (m=n).
Bounds defined for n=10k.
See the MGH class for more details.
Discrete boundary value test function (m=n).
No bounds defined.
See the MGH class for more details.
Discrete integral equation test function (m=n).
No boundas defined.
See the MGH class for more details.
Broyden tridiagonal test function (m=n).
No bounds defined.
See the MGH class for more details.
Broyden banded test function (m=n).
No bounds defined.
See the MGH class for more details.
Linear full rank test function (m>=n). Default m=n.
Bounds defined for n=5.
See the MGH class for more details.
Linear rank 1 test function (m>=n). Default m=n.
Bounds defined for n=5.
See the MGH class for more details.
Linear rank 1 zero columns and rows test function (m>=n). Default m=n.
Bounds defined for n=5.
See the MGH class for more details.
Chebyquad test function (m>=n). Default m=n.
Bounds defined for n=1, 7, 8, 9, and 10.
See the MGH class for more details.
Quadratic test function (m=n).
See the MGH class for more details.
McKinnon test function (n=2, m=1).
Does not calculate Jacobian, does not calculate auxiliary functions. Evaluates function and gradient in one step.
McKinnon, K. I. M.: Convergence of the Nelder-Mead Simplex Method to a Nonstationary Point. SIAM Journal on Optimization, vol. 9, pp. 148-158, 1998.
See the MGH class for more details.
Gao-Han almost quadratic function. m is not used. epsilon and sigma must not be negative.
Function is shifted so that the solution for epsilon=sigma=0 is at [1,1, ..., 1].
Does not calculate Jacobian, does not calculate auxiliary functions. Evaluates function and gradient in one step.
Gao, F., Han., L.: Implementing the Nelder-Mead simplex algorithm with adaptive parameters. Computational Optimization and Applications, vol 51, pp. 259-277, 2012.
See the MGH class for more details.
Quadratic function with Hilbert matrix for Hessian. Does not depend on m.
Does not calculate Jacobian, does not calculate auxiliary functions. Evaluates function and gradient in one step.
See the MGH class for more details.
Dixon function. Minimum is at [1, 1, ..., 1].
M.A. Wolfe, C. Viazminsky, Supermemory descent methods for unconstrained minimization, Journal of Optimization Theory and Applications 18 (1976) 455-469.
See the MGH class for more details.
Oren’s power function. Minimum is at [0, 0, ..., 0].
E. Spedicato, Computational experience with quasi-Newton algorithms for minimization problems of moderately large size, Report CISE-N-175, CISE Documentation Series, Segrato, 1975.
Definition from D. F. Shanno, Kang-Hoh Phua, Matrix conditioning and nonlinear optimization, Mathematical Programming, Volume 14, Issue 1, 1978, pp 149-160.
See the MGH class for more details.