'Predict response variable of a count model given exogenous variables.
Notes
If exposure is specified, then it will be logged by the method.
The user does not need to log it first.'

def predict(self, params, exog=None, exposure=None, offset=None, linear=False):

    if (exog is None):
        exog = self.exog
    if (exposure is None):
        exposure = getattr(self, 'exposure', 0)
    else:
        exposure = np.log(exposure)
    if (offset is None):
        offset = getattr(self, 'offset', 0)
    fitted = np.dot(exog, params[:exog.shape[1]])
    linpred = ((fitted + exposure) + offset)
    if (not linear):
        return np.exp(linpred)
    else:
        return linpred
