clad
clad copied to clipboard
Compute the hessian matrix diagonal only
In many cases we need only the diagonal for the optimizer seeding. We can avoid computing the full matrix as in problems with many parameters will be costly.
cc: @lmoneta.
@vaithak perhaps we can implement an option to the clad::jacobian and clad::hessian allowing the user to specify that they want only the diagonal. In turn we can change the differentiation plan to include only these instead of computing all and throwing them away.