You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, ftest uses the unadjusted R2, which is constrained by definition to be on [0, 1]. As it stands in the tests and doctests, we have several cases where the floating point results for a null model give an R2 of -0.0. That's fine numerically, but realistically we know that this should be positive zero. Moreover, if you use a different BLAS (e.g. MKL), then you do get nonnegative 0.0. This means that the doctests and tests for show methods can break based on the BLAS in a way that's much more annoying to fix than simply using isapprox instead of isequal.
This is in some sense an upstream issue (i.e. the definition of StatsBase.r2), but I'm hesitant to apply a constraint at that point because a clearly negative R2 could be a decent test for pathological method definitions of deviance and nulldeviance for a particular type.
The text was updated successfully, but these errors were encountered:
Currently,
ftest
uses the unadjusted R2, which is constrained by definition to be on [0, 1]. As it stands in the tests and doctests, we have several cases where the floating point results for a null model give an R2 of-0.0
. That's fine numerically, but realistically we know that this should be positive zero. Moreover, if you use a different BLAS (e.g. MKL), then you do get nonnegative0.0
. This means that the doctests and tests forshow
methods can break based on the BLAS in a way that's much more annoying to fix than simply usingisapprox
instead ofisequal
.Should we replace
GLM.jl/src/ftest.jl
Line 162 in 3f9c8e4
with
?
This is in some sense an upstream issue (i.e. the definition of
StatsBase.r2
), but I'm hesitant to apply a constraint at that point because a clearly negative R2 could be a decent test for pathological method definitions ofdeviance
andnulldeviance
for a particular type.The text was updated successfully, but these errors were encountered: