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
I just remembered, also partially related to #3840 and some other issues:
We don't have a clear internal API or pattern to set attributes that in some cases we need as lazy attributes, and sometimes we get them as byproduct of some computation.
We don't have many cases like that, so it never became high priority enough to figure this out.
for mu in GLM: #1720 and likely in other issues. Some things are left overs from previous versions, but we didn't investigate whether it is safe to remove.
That kind of explains how it got this way, but still leaves open the question of whether mu and scale should be attributes of self or result. self.mu is never used by GLM, seems very much like it should not be a Model attribute. scale is a little more ambiguous.
Looks like this has been an issue in the past: #2399
No tests break if I comment those lines out. in fit it sets self.scale and subsequently passes self.scale to the results constructor. Just changing self.scale-->scale there works fine.
Activity
josef-pkt commentedon Oct 12, 2017
I just remembered, also partially related to #3840 and some other issues:
We don't have a clear internal API or pattern to set attributes that in some cases we need as lazy attributes, and sometimes we get them as byproduct of some computation.
We don't have many cases like that, so it never became high priority enough to figure this out.
for
muin GLM: #1720 and likely in other issues. Some things are left overs from previous versions, but we didn't investigate whether it is safe to remove.jbrockmendel commentedon Oct 12, 2017
That kind of explains how it got this way, but still leaves open the question of whether mu and scale should be attributes of
selforresult. self.mu is never used by GLM, seems very much like it should not be a Model attribute. scale is a little more ambiguous.josef-pkt commentedon Oct 12, 2017
My only guess is that those two were added to fit_regularized in order to be consistent with fit_irls
@kshedden ?
jbrockmendel commentedon Oct 12, 2017
Looks like this has been an issue in the past: #2399
No tests break if I comment those lines out. in
fitit setsself.scaleand subsequently passesself.scaleto the results constructor. Just changingself.scale-->scalethere works fine.