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.
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
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
|?? fix ??|
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
John C Nash <firstname.lastname@example.org>
Maintainer: John C Nash <email@example.com>
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.