-
Notifications
You must be signed in to change notification settings - Fork 2
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
Floating point error in variance-combining #101
Comments
@adefazio suggested doing the combination in log space, which I think is a good idea. |
Sidenote: this would be a lot easier without the need to combine partial results - if all else fails, consider doing numerics with a channel and some worker threads. |
I'm now almost happy that this is as good as it's going to get. I've consulted a statistician who specialises in numerical analysis, assorted Ambiata data scientists, sundry papers and textbooks and Herbie and nothing's been better than my implementation as measured by relative error from the arbitrary-precision computation. Going to leave this open until I've derived the actual error bounds for the current version and its competitors, but I'm no longer assuming a better version exists. |
Current implementation is not associative, and I'm not sure if it can be made associative. However, error might be minimised by delaying combination until the end (memory permitting, need to work out if feasible) and then sorting the accumulators.
The text was updated successfully, but these errors were encountered: