1) The changes in ConjugateLinearModel.cpp, I really don't understand why the two temp variables are needed. This also worries me that this "fix" is perhaps hidding a different issue. I am going to instead force eval of the temporal calculated quantities using the *.eval() method in Eigen. This should also ensure these temporary variables hang around for only a minimal time.
2) Hessian Vector Product looks good! I am going to leave a wrapper in MongrelCollapsed_LGH.cpp but move the bulk of the function into MongrelCollapsed.h as this should enable faster evaluation without having to recreate the objects over and over. I bet this will give us a bigger speed up.
Thanks Kim!
Few points:
1) The changes in ConjugateLinearModel.cpp, I really don't understand why the two temp variables are needed. This also worries me that this "fix" is perhaps hidding a different issue. I am going to instead force eval of the temporal calculated quantities using the *.eval() method in Eigen. This should also ensure these temporary variables hang around for only a minimal time.
2) Hessian Vector Product looks good! I am going to leave a wrapper in MongrelCollapsed_LGH.cpp but move the bulk of the function into MongrelCollapsed.h as this should enable faster evaluation without having to recreate the objects over and over. I bet this will give us a bigger speed up.
3) I will have a closer look at the line-search.
4) Thanks for writing unit tests!