Skip to content

Commit

Permalink
some final tweaks for speed. Make _predict() a static method
Browse files Browse the repository at this point in the history
  • Loading branch information
pzivich committed Aug 10, 2018
1 parent 9c81fb3 commit 6a92807
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zepid/causal/gformula/TimeVary.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ def fit(self, treatment, lags=None, sample=10000, t_max=None, in_recode=None, ou
self._covariate].sort_values(by=['uid_g_zepid',
self.time_in]).reset_index(drop=True)

def _predict(self, df, model, variable, se=None):
@staticmethod
def _predict(df, model, variable, se=None):
"""
This predict method gains me a small ammount of increased speed each time a model is fit, compared to
statsmodels.predict(). Because this is repeated so much, it actually decreases time a fair bit
Expand Down

0 comments on commit 6a92807

Please sign in to comment.