Add sparse hessian to deal with multiple or incomplete observations#8
Add sparse hessian to deal with multiple or incomplete observations#8
Conversation
|
We should meet about this. I think we can generically handle multiple observations by wrapping into a modified likelihood. The only time we have a non diagonal hessian for the likelihood is when it involves a sum of multiple predictions (integral or something). I’m also about to push some minor changes I ran into from doing the sub national estimation from Reed. |
That sounds good! I will send an invite, sorry just saw this. I will leave this PR open until we discuss. |
Allow number of rows in
datato be different than number of variablesjax.experimental.sparse.BCOOhessian_diagfunction byhessianin the likelihood (this will influence model.hessian and preconditioner)data_spanin the functionKernelRegModel.fit, in casedatais incomplete and does not contain all coordinate we are interested.Note
BCOOseems cannot handle matrix-matrix multiplication, at least not on my computer. We need to create a operator for Hessian in the likelihood, which is probably preferable anyway :)jitthe function that will return a function, please see NewTypeError: <class 'function'> is not a valid JAX typeexception in JAX 0.2.0 jax-ml/jax#4416, and all the objective, gradient and hessian computation are vectorized, so maybe we don't needjitfor them.