Skip to content

code review: GLM #1720

Open
Open

Description

@josef-pkt
  • why do we calculate pinv_wexog in GLM.initialize? It's not used AFAICS.
    normalized_cov_params is calculated with it, but that's also unused.
  • fit "state" attached to the model: several fit results are attached to model (e.g. mu). It's part of the design for the iterative estimation. I don't see a problem, but it would be better to detach those from the model, once they are attached to the results instance.

naming

  • family predict versus fitted: not clear which is which. ?
    (difficult because statistics and econometrics differ, link versus inverse-link)

Activity

  1. josef-pkt commented on Jun 2, 2014

    @josef-pkt
    MemberAuthor

    minor: copy offset only if we have to change it:

            if hasattr(self, 'offset'):
                #offset = self.offset.copy()
                offset = self.offset
            if hasattr(self, 'exposure'):
                #offset += self.exposure
                offset = offset + self.exposure
    
  2. added this to the 0.10 milestone on Oct 11, 2017
  3. josef-pkt commented on Oct 11, 2017

    @josef-pkt
    MemberAuthor

    bump for 0.10

    I just saw again the first why? I don't see any reason.

    in GLM.initialize

            self.pinv_wexog = np.linalg.pinv(self.exog)
            self.normalized_cov_params = np.dot(self.pinv_wexog,
                                                np.transpose(self.pinv_wexog))
    

    And the GLMResults.__init__ attaches pinv_wexog for no reason that I can see

    my guess is that these are leftovers from earlier versions of fit.

  4. josef-pkt commented on May 13, 2018

    @josef-pkt
    MemberAuthor

    pinv in initialize has been removed in #4624

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions