aezarebski / timtam2

This repository is an implementation of the TimTam likelihood as a BEAST2 package.
https://aezarebski.github.io/timtam/
MIT License
3 stars 0 forks source link

scale operator is not working #9

Closed aezarebski closed 2 years ago

aezarebski commented 2 years ago

https://github.com/aezarebski/timtam2/blob/b4bd950fc5bcc861918fa4fd31a738ab60cb99e7/doc/vignettes/estimated-tree-without-rho/analysis.xml#L165

proposals from the scale operator are never accepted, but if you put the same parameter in an updown operator then a decent proportion of the proposals are accepted. It would be much nicer if we could use the scale and random walk operators on the parameters directly rather than needing to use an updown operator.

laduplessis commented 2 years ago

Have you tried lowering the scaleFactor? With such a high scaleFactor and a fairly tight parameter range you may jumping out of the range each time the operator is called. Increasing the weight will cause the operator to be called more often, so you can see if modifying anything else will get it to be accepted.

aezarebski commented 2 years ago

Thanks, solved! I hadn't overwritten the requiresRecalculation method. That also explains why it worked with the UpDown operator which touched the tree but not the scale or random walk operators which only touched the parameters.