Hi everyone,
I have come into an issue while using checkhessian in a very particular case:
Checking a problem involving only linear manifolds and a quadratic function.
In this case the (2nd order) truncated Taylor expansion is actually exact (up to numerical precision),
so the approximation error is always zero, whatever the value of the step h in the Hessian check plot.
Since I'm used to do a quick check visually comparing the slope of the error
to the reference slope (which should usually be 3 in both cases),
I was visualizing just a noisy output for the approximation error (near the machine epsilon).
This got me totally confused for a while, until I stopped for a moment,
revisited the description of checkhessian in the webpage,
and made sense of the output: The model was exact.
So, to sum up, this a quite unusual case. Yet I looked for any related topic in the forum and couldn't find anything,
so I thought it would be interesting to share it here.
Also, I think this special case could be easily detected in the checkdiff and checkhessian functions
by checking if the approximation error is very close to zero for all h. Launching a warning
or explicit comment pointing to the case of exact approximation would be useful then
to avoid any misleading for those absent-minded as me :)
Regards,
J Briales