Skip to content

REF/ENH/Design: link versus mean function #4278

Open

Description

@josef-pkt

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.)

Activity

  1. sadepu1915 commented on Jun 28, 2019

    @sadepu1915

    can i jump on it ?

  2. josef-pkt commented on Jun 29, 2019

    @josef-pkt
    MemberAuthor

    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.

  3. josef-pkt commented on Dec 11, 2020

    @josef-pkt
    MemberAuthor

    I like the name link for index models, so maybe we could use ilink (short for inverse link) in models.

    shows up again in
    #7166 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions