christiaanjs / treeflow

GNU General Public License v3.0
13 stars 4 forks source link

Figure out why `fit_surrogate_posterior` doesn't work #60

Closed christiaanjs closed 1 year ago

christiaanjs commented 1 year ago

When we use tfp.vi.fit_surrogate_posterior instead of our own (very simple) VI loss something gets mixed up and we end up with wrong results. When a singleton sample dimension is added this replicates the behaviour of fit_surrogate_posterior.

Just adding sample_size and importance_sample_size arguments (>1) doesn't cause any run time errors so the issue must be a silent mixup of axes. Does the fact that nucleotide frequencies come out correct but in the wrong order give us a clue what might be happening?