watson: Watson Function

View source: R/20_watson.R

watsonR Documentation

Watson Function

Description

Test function 20 from the More', Garbow and Hillstrom paper.

Usage

watson()

Details

The objective function is the sum of m functions, each of n parameters.

  • Dimensions: Number of parameters 2 <= n <= 31, number of summand functions m = 31.

  • Minima: f = 2.28767...e-3 if n = 6; f = 1.39976...e-6 if n = 9; f = 4.72238...e-10 if n = 12

The number of parameters, n, in the objective function is not specified when invoking this function. It is implicitly set by the length of the parameter vector passed to the objective and gradient functions that this function creates. See the 'Examples' section.

Value

A list containing:

  • fn Objective function which calculates the value given input parameter vector.

  • gr Gradient function which calculates the gradient vector given input parameter vector.

  • he If available, the hessian matrix (second derivatives) of the function w.r.t. the parameters at the given values.

  • fg A function which, given the parameter vector, calculates both the objective value and gradient, returning a list with members fn and gr, respectively.

  • x0 Function returning the standard starting point, given n, the number of variables desired.

  • fmin reported minimum

  • xmin parameters at reported minimum

References

More', J. J., Garbow, B. S., & Hillstrom, K. E. (1981). Testing unconstrained optimization software. ACM Transactions on Mathematical Software (TOMS), 7(1), 17-41. \Sexpr[results=rd]{tools:::Rd_expr_doi("doi.org/10.1145/355934.355936")}

Kowalik, J. S., & Osborne, M. R. (1968). Methods for unconstrained optimization problems. New York, NY: Elsevier North-Holland.

Examples

wat <- watson()
# 6 variable problem using the standard starting point
x0_6 <- wat$x0(6)
res_6 <- stats::optim(x0_6, wat$fn, wat$gr, method = "L-BFGS-B")
# Standing starting point with 9 variables
x0_9 <- wat$x0(9)
res_9 <- stats::optim(x0_9, wat$fn, wat$gr, method = "L-BFGS-B")
# Create your own 3 variable starting point
res_3 <- stats::optim(c(0.1, 0.2, 0.3), wat$fn, wat$gr, method = "L-BFGS-B")

jlmelville/funconstrain documentation built on April 17, 2024, 7:47 p.m.