def fit(self, X, y):
        """
        Pretend to be a sklearn estimator, fit is called on creation
        """

        # note that GLM takes endog (y) and then exog (X):
        # this is the reverse of sklearn's methods
        self.glm_model = self.glm_partial(y, X)
        self.glm_results = self.glm_model.fit()
        return self
def fit ( self , X , y ) : self . glm_model = self . glm_partial ( y , X ) self . glm_results = self . glm_model . fit ( ) return self
Pretend to be a sklearn estimator, fit is called on creation