Compare differences in gradients of loss functions computed using automatic and numerical differentiation
compare_grads(model, tolerance = 1e-05, tmb_pars = NULL, ...)
compare_hessians(model, tolerance = 1e-05, tmb_pars = NULL, ...)
flexmodel
numerical tolerance to pass to all.equal
--
if NA
, then a list is returned that can be passed to
all.equal
using do.call
optional parameters to pass to the tmb functions
additional arguments to pass to numDeriv::grad
either (1) the return value of all.equal
comparing
gradients using TMB auto differentiation to numDeriv::grad
if
is.numeric(tolerance)
,
or (2) a list is returned that can be passed to
all.equal
using do.call
if is.na(tolerance)
Other compare:
compare_sims()
,
time_wrap()