Better timeslices
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
E.g. look at the oldest points in the before and after plots:

This is super @hyanwong!! How about some simple metrics like MSE and spearman's to benchmark?
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.
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?
do you want to check it looks OK
Never mind, I merged it anyway, as it's only in the test suite.
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.
Annoyingly this does seem to make accuracy worse in simple cases. Perhaps we should think about fixing the prior first, then return to this.