Custom hessian sparsity pattern

28 views
Skip to first unread message

Jan-Ole Koslik

unread,
May 6, 2025, 1:49:04 PMMay 6
to TMB Users
Hi, 

I'm not sure if this topic already came up at some point, at least I couldn't find it. 

Is there any way to "modify" the automatically detected sparsity pattern?

I'm asking this because in the area of application I'm working in, the Hessian of the joint likelihood in the random effects is never sparse, but "practically" sparse, meaning that only using a banded version would probably suffice (for approximate ML). 

The non-sparsity makes TMB unusable in this setting, so it would be super useful to be able to define a custom sparsity pattern?

I'm guessing something like that is not implemented at the moment, but is there maybe a hack that would allow to only evaluate parts of the hessian or sth.?

Very open question, sorry.

Cheers :)

Hans Skaug

unread,
May 9, 2025, 1:32:29 AMMay 9
to TMB Users
My guess is that this is not possible the way you would like, but as a user you control the sparsity pattern when you formulate the objective function.
Maybe that is an indirect way of achieving what you want. 

Jan-Ole Koslik

unread,
May 10, 2025, 11:44:55 AMMay 10
to TMB Users
Thanks Hans, 
I feared that but I wanted to make sure there is no simple way first. :D

Reply all
Reply to author
Forward
0 new messages