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
In test_glm and test_glm_weights a bunch of tests are run in a loop in test_wtd_gradient_irls, test_gradient_irls_eim, test_gradient_irls. In each of these a variable skip_one is set to False outside the loop, then in one location in the loop is set to True. Is that intentional? it seems more likely in context that skip_one should be set to False in every step of the loop except for that one.
It also looks like the case where skip_one is set to True also fails to define lin_pred, so it will keep the lin_pred from the last stage of the loop. This seems very likely unintentional. @josef-pkt any idea?
I'm pretty sure it's intentional to skip some irls cases, but I'm not sure whether it works as intended.
(I haven't looked at it long enough to figure out again what might be the intention. )
I think you're right that it is to skip some irls cases, but I think that the way it is written is likely not the way it is intended. It looks like the intention is to skip the one specific case where skip_one is overriden, but the behavior is to skip that case and all subsequent cases in the loop.
I think so too, my guess is that the initialization to skip_one = False is supposed to be inside the loop.
I briefly tried to follow the commit/PR/issue, but didn't find anything that quickly explains which convergence failures are avoided by this #2834 7fdcd23
Looks like this causes one more case to fail. I updated the PR so it sets skip_one = True in only the relevant cases and otherwise sets it to False inside the loop.
As to the difference in lin_pred in test_glm_weights, making it match causes a failure in one case where params only match up to two decimal places. For now I'm skipping that precise case using skip_one.
Identifying troublesome cases will be easier after moving to parametrize
Activity
jbrockmendel commentedon Aug 18, 2018
It also looks like the case where
skip_oneis set toTruealso fails to definelin_pred, so it will keep the lin_pred from the last stage of the loop. This seems very likely unintentional. @josef-pkt any idea?josef-pkt commentedon Aug 18, 2018
I'm pretty sure it's intentional to skip some irls cases, but I'm not sure whether it works as intended.
(I haven't looked at it long enough to figure out again what might be the intention. )
jbrockmendel commentedon Aug 18, 2018
I think you're right that it is to skip some irls cases, but I think that the way it is written is likely not the way it is intended. It looks like the intention is to skip the one specific case where
skip_oneis overriden, but the behavior is to skip that case and all subsequent cases in the loop.josef-pkt commentedon Aug 18, 2018
I think so too, my guess is that the initialization to
skip_one = Falseis supposed to be inside the loop.I briefly tried to follow the commit/PR/issue, but didn't find anything that quickly explains which convergence failures are avoided by this #2834
7fdcd23
jbrockmendel commentedon Aug 18, 2018
OK. I'll see if changing that breaks any tests and if not, update the PR.
jbrockmendel commentedon Aug 18, 2018
Looks like this causes one more case to fail. I updated the PR so it sets
skip_one = Truein only the relevant cases and otherwise sets it toFalseinside the loop.As to the difference in
lin_predintest_glm_weights, making it match causes a failure in one case where params only match up to two decimal places. For now I'm skipping that precise case usingskip_one.Identifying troublesome cases will be easier after moving to parametrize