another question about NUTS

45 views
Skip to first unread message

Qing Zhao

unread,
Nov 4, 2024, 5:36:02 PM11/4/24
to nimble-users
Dear Team,

Now NUTS seems to work well for me, I'm considering what the best way is to use it. Thinking about Stan, I would assume that all the parameters are updated in one big block. Nimble allows us to group parameters and update them in different blocks, when using NUTS (but let me know if I got it wrong). That makes me wonder if I should simply swap NUTS in for all the continuous parameters in a model and update them in one big block. Are there any general rules for this? Thank you.

Best,
Qing

Chris Paciorek

unread,
Nov 5, 2024, 3:15:14 PM11/5/24
to Qing Zhao, nimble-users
Hi Qing,

This is a good question. I don't think there are general rules. Certainly updating all the continuous parameters via NUTS in one big block would be the standard way to do things and allows NUTS to account for all the possible dependence amongst the parameters. But you could consider using smaller blocks. Presumably you'd want the smaller blocks to not have much dependence between them.

-Chris

--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/nimble-users/e7f6ab86-6025-49d4-a2da-0e7172d24541n%40googlegroups.com.

Qing Zhao

unread,
Nov 5, 2024, 4:57:36 PM11/5/24
to paci...@stat.berkeley.edu, nimble-users
Hi Chris,

Thank you for the response.

Best,
Qing

Qing Zhao

unread,
Nov 7, 2024, 9:20:20 PM11/7/24
to nimble-users
Hi Chris & Team,

A follow up question: for most of the parameters in my model, the default sampler is RW sampler. However, there are two parameters for which the default sampler is conjugate sampler. I would assume there is no need to change the sampler for these two parameters, since conjugate sampler is kind of the most efficient samplers already. Is that correct?

Best,
Qing

Chris Paciorek

unread,
Nov 8, 2024, 10:41:40 AM11/8/24
to Qing Zhao, nimble-users
Hi Qing, if there is no dependence between one parameter and the rest of the parameters, then yes, I'd expect a conjugate sampler to be the best choice for that parameter. But when there is dependence between that parameter and the others, that won't necessarily be the case, and the best choice will probably depend on the strength of the dependence. That's because the sampling for the one parameter will be constrained by the current values of the other parameters. So it can be better to use blocking and not to take advantage of conjugacy for the component parameters.

There can also be effects from the computational costs of the different potential samplers that affect what choice is best.

-Chris



Qing Zhao

unread,
Nov 8, 2024, 11:30:30 AM11/8/24
to paci...@stat.berkeley.edu, nimble-users
Hi Chris,

Thank you for your explanation.

Best,
Qing

Reply all
Reply to author
Forward
0 new messages