tsdate icon indicating copy to clipboard operation
tsdate copied to clipboard

Better timeslices

Open hyanwong opened this issue 3 years ago • 7 comments

Finally fixes #7 and produces a much nicer looking fit for large tree sequences, but leads to slightly worse performance for tiny tree sequences such as those tested in test_accuracy.py, because of #230. When we fix that, this PR should provide uniformly better performance, I hope

hyanwong avatar Jan 09 '23 00:01 hyanwong

E.g. look at the oldest points in the before and after plots:

image image

hyanwong avatar Jan 09 '23 00:01 hyanwong

This is super @hyanwong!! How about some simple metrics like MSE and spearman's to benchmark?

awohns avatar Jan 09 '23 00:01 awohns

This is super @hyanwong!! How about some simple metrics like MSE and spearman's to benchmark?

Yes, I could add MSE / Spearmans to the "unit" tests at https://github.com/tskit-dev/tsdate/blob/main/tests/test_accuracy.py I guess. The tests there are just to check that we don't accidentally introduce worse performance.

hyanwong avatar Jan 09 '23 09:01 hyanwong

I added Spearman's in #236 @awohns (along with a test that we scale correctly with Ne)- do you want to check it looks OK and then I can merge #236 which will give us a decent backbone for testing changes such as in this PR?

hyanwong avatar Jan 09 '23 13:01 hyanwong

do you want to check it looks OK

Never mind, I merged it anyway, as it's only in the test suite.

hyanwong avatar Jan 13 '23 19:01 hyanwong

I think we should merge this anyway: looks like we might move away from a grid of timepoints to the variational method, but I don't want the fixed grid method to be completely forgotten about and consigned to the bin because of a timeslice issue.

hyanwong avatar Jun 14 '23 08:06 hyanwong

Annoyingly this does seem to make accuracy worse in simple cases. Perhaps we should think about fixing the prior first, then return to this.

hyanwong avatar Jul 13 '23 14:07 hyanwong