-
Notifications
You must be signed in to change notification settings - Fork 77
Provide feedback or adaptive epsilon for split polytomies? #1088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm currently still failing on epsilon = 1e-60, which is weird because |
Attached is the 1-tree sequence, which indeed has a minimum time between nodes of ~2.33e-10, but which still fails to split_polytomies with epsilon=1e-100:
|
I don't think suggesting a value will make any difference here, since the suggested value would only work in the specific case that has just failed. In situations like this, it's very likely that it would fail again soon afterwards with a slightly smaller value. So, suggested values would just be frustrating, IMO. Adaptive is tricky. If the values need to be this small, then I'm not sure it would work anyway, as we'd likely hit DBL_EPS. I'll take a look at the example, this seems weird. |
I have a PR (about to put in) that collects the bad nodes and then at the end reports the worst, with a recommended epsilon. I think that should allay your first point. Thanks for looking into this. I was about to do so once I figured out how to best send informative error messages (i.e. the PR), so I could debug easily. |
PR now at #1089, which might help to debug the case above too. |
OK, so this is weird. My code is indeed useful:
|
I think |
Ah, this might indeed be the problem. So we can't have differences between nodes that are smaller than some value, where that value is relative to the size of the node time, somewhere around 1e-16 times smaller? |
This is likely to catch out people like me, I think. We should warn about it somewhere. Perhaps when we fail to make the TS event after checking for minimum epsilon times in my PR #1089 |
I'm working up a PR based on using nextafter and giving good errors @hyanwong. There's a few problems with your approach, it's simpler to code it up. |
Sure. I would be careful about using |
Uh oh!
There was an error while loading. Please reload this page.
We deliberately removed both the feedback about what epsilon value to used, and the ability to calculate a sensible epsilon value in split_polytomies, but that's now wasted a day of compute time because my simulations all aborted, firstly with the default, and again when I set epsilon to 1e-20, both with the somewhat unhelpful error message:
since I need to split polytomies before saving results. I'm now trying with 1e-40, but that might not work either (I guess this is because of trying to split polytomies in nodes produced via tsinfer path compression, which are placed by some small epsilon above their child nodes). So having an adaptive epsilon seems like a good plan here. Or if not that, at least suggesting what a possible working value of epsilon should be. I previously made some suggestions how to do this here.
The text was updated successfully, but these errors were encountered: