A bunch of stuff is in slightly wonky debugging state right now, but I'm committing before making a significant change to how dimension matching works.
Haven't worked on this in a while. Still broken, but I'm committing what I have.
Ok, fixed the problem with mixed model (just needed to initialize the weights correctly before instantiating a sampler for that model). Now I'll check to make sure that the extended parameter space is also fine.
K, extended parameter space seems fine. Now going to try all three mixture components w/ correctly annealing.
Ok, this time only about half the proposals are accepted. That makes sense, I think: the NUTS sampler is moving along trajectories that are good in the extended parameter space, but this isn't always the best thing for either the 'old' or 'new' parameter subspaces. I'm going to call it good, and move on by re-introducing the specialized unroll behavior for grammars.
Ok, specialized unroll seems fine. Next up: re-introducing the mobile factor template.
The remaining problem has something to do with constructing a new inner sampler. I've tried copying over every member of nuts (or subclasses) that might be relevant in an attempt to make the new sampler as much a pure copy of the old one as possible, but it's still not working. I'm going to try a different approach.
Mmmk, did a different approach to changing the current unrolled model that doesn't require me to re-construct a new sampler every time. This seems to have helped, but it's still not bug-free.
Switched back to the old style of 're-constructing the inner sampler,' now that I figured out how to also make that work.