[GenABEL-dev] Tolerance level in GenABEL RUnit test
Yury Aulchenko
yurii.aulchenko at gmail.com
Fri Jun 26 19:46:29 CEST 2015
Interesting. I suspect what may be the reason (the way inverse is computer, or rather, not computed, by the new procedure, which makes difference in case of bad/poor GRMs), let me have a look in this when I get a little time.
----------------
Sent from mobile device, please excuse possible typos
> On 08 May 2015, at 15:52, L.C. Karssen <lennart at karssen.org> wrote:
>
> I spoke too early: in fact almost all checks in runit.polylik.R fail:
>
>> checkEquals(h2htNew$h2an$est,h2htOld$h2an$est, tolerance = tol)
> Error in checkEquals(h2htNew$h2an$est, h2htOld$h2an$est, tolerance = tol) :
> Mean relative difference: 3.36492e-05
>
>> checkEquals(h2htNew$h2an$min,h2htOld$h2an$min, tolerance = tol)
> Error in checkEquals(h2htNew$h2an$min, h2htOld$h2an$min, tolerance = tol) :
> Mean relative difference: 5.961843e-06
>
>> checkEquals(h2htNew$residualY,h2htOld$residualY, tolerance = tol)
> Error in checkEquals(h2htNew$residualY, h2htOld$residualY, tolerance =
> tol) :
> Mean relative difference: 4.462787e-05
>
>> checkEquals(h2htNew$pgresidualY,h2htOld$pgresidualY, tolerance = tol)
> Error in checkEquals(h2htNew$pgresidualY, h2htOld$pgresidualY, tolerance
> = tol) :
> Mean relative difference: 0.001496624
>
>> checkEquals(h2htNew$InvSigma,h2htOld$InvSigma, tolerance = tol)
> Error in checkEquals(h2htNew$InvSigma, h2htOld$InvSigma, tolerance = tol) :
> Mean relative difference: 0.004265527
>
>> checkEquals(h2htNew$measuredIDs,h2htOld$measuredIDs, tolerance = tol)
> [1] TRUE
>
>
> So the question remains: is this to be expected and should the tolerance
> be set less strict or is this a true bug that needs fixing?
>
>
> Thanks,
>
> Lennart.
>
>> On 08-05-15 15:26, L.C. Karssen wrote:
>> Dear list,
>>
>> I just ran the unit tests in GenABEL's /insts/unitTests/ directory and
>> get the following error:
>>
>> 1 Test Suite :
>> GenABEL unit testing - 21 test functions, 0 errors, 1 failure
>> FAILURE in test.polylik: Error in checkEquals(h2htNew$h2an$est,
>> h2htOld$h2an$est, tolerance = tol) :
>> Mean relative difference: 8.295007e-05
>> Error:
>>
>> unit testing failed (#test failures: 1, #R errors: 0)
>>
>>
>> This is a test in the runit.polylik.R file. The variable "tol" is set to
>> 2*.Machine$double.eps^0.5, which is equal to 2.980232e-08 on my
>> machine. As you can see the difference in the unit test is more than
>> three orders of magnitude higher.
>>
>> The two variables that are compared are calculated like this:
>> h2htOld <- polygenic(formula,kin=gkin,df,llfun="polylik")
>> h2htNew <- polygenic(formula,kin=gkin,df,llfun="polylik_eigen")
>>
>> Since I'm not an expert on the finer details of the various functions
>> used in polygenic() I was hoping one of you could enlighten me and tell
>> me if we should expect the comparison to give a difference of order 1e-8
>> or that 1e-4 is good enough.
>>
>>
>> Thanks for your help,
>>
>> Lennart.
>>
>>
>>
>> _______________________________________________
>> genabel-devel mailing list
>> genabel-devel at lists.r-forge.r-project.org
>> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel
>
> --
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> L.C. Karssen
> Utrecht
> The Netherlands
>
> lennart at karssen.org
> http://blog.karssen.org
> GPG key ID: A88F554A
> -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
>
> _______________________________________________
> genabel-devel mailing list
> genabel-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel
More information about the genabel-devel
mailing list