Provide d2logp for black-box model

I’ve been using a modified version of the black-box likelihood example, my code wraps several C-functions.
In that black-box example one makes a grad method, which enables NUTS to be used. However, that particular example doesn’t create a hess method.

My questions are:

  • would NUTS be sped up even further if a hess method was available in LogLikeWithGrad?
  • does the black-box example calculate a hessian under the hood (using LogLikeWithGrad.grad)?
  • what would a hessian function look like if it had to be provided? Would it be the vector-Hessian Product?

For the hessian you need your gradient Op to itself have a gradient implemented.

We don’t use it anywhere in the codebase so it shouldn’t provide any speedup