'Initialize a generalized linear model.'

def initialize(self):

    self.history = {'fittedvalues': [], 'params': [np.inf], 'deviance': [np.inf]}
    self.pinv_wexog = np.linalg.pinv(self.exog)
    self.normalized_cov_params = np.dot(self.pinv_wexog, np.transpose(self.pinv_wexog))
    self.df_model = (np_matrix_rank(self.exog) - 1)
    if ((self.freq_weights is not None) and (self.freq_weights.shape[0] == self.endog.shape[0])):
        self.wnobs = self.freq_weights.sum()
        self.df_resid = ((self.wnobs - self.df_model) - 1)
    else:
        self.wnobs = self.exog.shape[0]
        self.df_resid = ((self.exog.shape[0] - self.df_model) - 1)
