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
an old design question:
Do we parameterize GLM or single index models with mean function or link function, i.e. transform linpred (link.inverse) or transform expected value (link)?
The main question: Is it worth it to duplicate the code and add inverse classes for the links?
I don't think we ever want to reparameterize GLM because it would take it too far from the literature and user expectations.
code organization: Outside GLM most models and transformations are defined by inverse link (some articles even use the term link for the inverse link, i.e. mean function. )
This becomes relevant as we add more models that require one or several links or transformations ENH/Design GLM pattern, families, links, for non-LEF distributions #3915
Currently we use hard coded parameter transformation in several cases (mainly exp for positive)
numerical efficiency and sensitivity to corner cases: this is the complementary issue to ENH/REF GLM simplify computation if is_canonical #4269. Would it be numerically more stable to use the mean function and it's derivative, instead of those defined by links?
Eg, link.deriv is 0 if evaluated at mu = 0, but we use generally often need 1/link.deriv
(motivation: I'm reading/skimming too many old GLM articles which I guess only apply to canonical cases, but I'm mainly interested in the general cases, and it's work to figure out whether and what applies in the general case. If we have to do a general derivation of the equations or formulas, then using mean function is easier than link function.)
This is a design question and there is nothing immediately to do here.
It is something that has been bothering me for a long time, we won't change GLM link functions and the future of transformation functions outside of GLM is still unclear.
What can be checked within the current models and classes is whether we use the numerically more efficient or more stable way of computing the parts.
Activity
sadepu1915 commentedon Jun 28, 2019
can i jump on it ?
josef-pkt commentedon Jun 29, 2019
This is a design question and there is nothing immediately to do here.
It is something that has been bothering me for a long time, we won't change GLM link functions and the future of transformation functions outside of GLM is still unclear.
What can be checked within the current models and classes is whether we use the numerically more efficient or more stable way of computing the parts.
josef-pkt commentedon Dec 11, 2020
I like the name
linkfor index models, so maybe we could useilink(short for inverse link) in models.shows up again in
#7166 (comment)