avoid sampling parameters of empty clusters in BNP#855
Conversation
for conjugate sampler
BNP cluster parameters and only samples when cluster is not empty; added tests
|
@paciorek Looks like tests are failing, related to I'm guessing it will be a quick and easy fix (typo or similar), but I'll leave it for you. |
|
One note for future reference - when this is implemented (and in combination with v 0.7.0 changes to sampler_CRP), for non-conjugate samplers we now propose new values of the cluster parameter, and if they are rejected the proposed values are maintained in the MCMC output. Now they are parameter values for clusters with no observations so they are in any real sense not meaningful, but it is different than having the cluster parameters stay constant until the cluster actually has observations. |
nosample empty clusters
nosample empty clusters; add code to nonconj CRP sampler that restores marginalizedNodes values if new cluster not opened
fix bug in BNP
of nosample_empty_clusters2 and hotfix_bnp_update
changes when do not sample empty clusters
to put back original cluster param values if no new cluster is opened; add tests for multiple cluster vars and for mv cluster nodes
directly from existing confs
in future in nosample_empty_clusters2
nosample_empty_clusters2 with devel
|
Actually regarding the note above for future reference, I implemented code where we put back the old values if the new cluster is not occupied. |
branch
nosample_empty_clusters2replacesnosample_empty_clustersand this PR replaces PR #839@danielturek please take a look at the modifications and let me know of any other thoughts.