View source: R/testquadratic.R
testquadratic | R Documentation |
Uses the CppAD
parameter property and derivatives (via tape_Jacobian()
) to test whether
the tape is quadratic.
Uses the CppAD
parameter property and derivatives (via tape_Jacobian()
) to test whether
the tape is quadratic.
testquadratic(
tape,
xmat = matrix(tape$xtape, nrow = 1),
dynmat = matrix(tape$dyntape, nrow = 1),
verbose = FALSE
)
tape |
An |
xmat |
The third-order derivatives at independent variable values of the rows of |
dynmat |
The third-order derivatives at independent variable values of the rows of |
verbose |
If TRUE information about the failed tests is printed. |
Uses the xtape
and dyntape
values stored in tape
to create new tapes.
A tape of the Hessian is obtained by applying tape_Jacobian()
twice, and then uses the CppAD
parameter property to test whether the Hessian is constant. A function of quadratic form should have constant Hessian.
If xmat
and dynmat
are non-NULL
then testquadratic()
also checks the Jacobian of the Hessian at xmat
and dynmat
values. For quadratic form functions the Jacobian of the Hessian should be zero.
TRUE
or FALSE
Other tape evaluators:
evaltape()
,
quadratictape_parts()
,
smvalues()
Other tape evaluators:
evaltape()
,
quadratictape_parts()
,
smvalues()
tapes <- tape_smd(
"sim", "sqrt", "sph",
ll = "ppi",
ytape = c(0.2, 0.3, 0.5),
usertheta = ppi_paramvec(p = 3),
bdryw = "minsq",
acut = 0.1,
verbose = FALSE)
testquadratic(tapes$smdtape)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.