A set of functions that wrap user objective, gradient and hessian functions, that allow the user functions to be checked for consistency and validity, that parameters satisfy bounds, or which check a set of parameters for optimality conditions, including generation of an appropriate numerical approximation to gradient or hessian.

Share:

Description

The three functions ufn, ugr and uhess wrap corresponding user functions fn, gr, and hess so that these functions can be executed safely (via try()) and also so parameter or function scaling can be applied. The wrapper functions also allow for maximization of functions (via minimization of the negative of the function) using the logical parameter maximize.

There are three test functions, fnchk, grchk, and hesschk, to allow the user function to be tested for validity and correctness. However, no set of tests is exhaustive, and extensions and improvements are welcome. The package numDeriv is used for generation of numerical approximations to derivatives.

Details

?? fix ??
Package: optfntools
Version: 2011-9.25
Date: 2011-09-25
License: GPL-2
Lazyload: Yes
Repository: R-Forge
Repository/R-Forge/Project: optimizer
Repository/R-Forge/Revision:
Date/Publication:

Index:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
ufn          Wrapper for user objective function
ugr          Wrapper for user gradient function
uhess        Wrapper for user Hessian function
fnchk        Test validity of user function
grchk        Check that gradient function evaluation 
             matches numerical gradient
hesschk      Check that Hessian function evaluation 
             matches numerical approximation
gHgen        Compute gradient and Hessian as a given 
             set of parameters
gHgenb       Compute gradient and Hessian as a given 
             set of parameters appying bounds and masks
ugHgenb      Compute gradient and Hessian as a given 
             set of parameters appying bounds and masks
             but using the opx12env list of fn, gr, and 
             hess. Note FIXED name opx12env

Author(s)

John C Nash <nashjc@uottawa.ca>

Maintainer: John C Nash <nashjc@uottawa.ca>

See Also

optimx