Open maarten-k opened 7 years ago
Just to be clear, this is in the "internal validation" checks, not the ones where the ProbABEL output is compared to R's output, right? (The case of comparing against R is handled in issue #11.)
And I assume it's with v0.5.0, correct?
I checked out the master branch.. It works fine with EIGEN 3.2.X but fails with 3.3.1. Issue #11 seems not to occur with EIGEN 3.3.1
In the past we have regularly run into this kind of issues with rounding differences between plain text files and filevector files. The main problem has to do with the conversion of either strings to doubles (in plain text files) and floats to doubles (stored binary in filevector files). Internally all calculations are performed on doubles, but imputed data is only accurate up to a few (two, three) significant digits and can therefore easily be stored in floats.
I'm not sure why these rounding errors show up now and then in the sixth decimal. Is it a real rounding error in the calculation or a problem caused by reading or printing the number from/to file (using C++'s iostream library)?
For the output we currently hard code the precision to 6, because that's the limit of a float. Maybe using std::numeric_limits::digits10
is more appropriate, but I'm not sure if it would change things.
In terms of statistics or biology this kind of deviation is negligible. Since the tests in test_bt.sh are also with a test compare to R ( @lckarssen are they?), it is safe to assume everything works fine. The question is how to confidence our test without making them less sensitive.
About biology/statistics: that's true (although ideally I would like to have the numbers equal because we calculate at a much higher precision internally).
The R comparison tests are done in separate scripts (see the checks/R-tests/
directory).
Just a quick note to correct @maarten-k's statement: Issue #11 does occur also with Eigen v3.3.1.
make check fails when I try compile ProbABEL against EIGEN 3.3.1.
I looks like a simple rounding error, but since the data is the same (only file format changes) it is at least a bit odd.
To reproduce run from within the ProABEL folder: