running example from the homepage gives error
Closed this issue · 1 comments
TypeError Traceback (most recent call last)
in ()
16 from sklearn.cross_validation import train_test_split
17 data_train, data_test = train_test_split(iris_df)
---> 18 model.fit(data_train)
19 print(model.score(data_test))
20
/opt/anaconda/lib/python2.7/site-packages/patsylearn/patsy_adaptor.pyc in fit(self, data)
81 """
82 eval_env = EvalEnvironment.capture(self.eval_env, reference=1)
---> 83 formula = _drop_intercept(self.formula, self.add_intercept)
84 design_y, design_X = dmatrices(formula, data, eval_env=eval_env,
85 NA_action=self.NA_action)
/opt/anaconda/lib/python2.7/site-packages/patsylearn/patsy_adaptor.pyc in _drop_intercept(formula, add_intercept)
15 if not add_intercept:
16 if not isinstance(formula, ModelDesc):
---> 17 formula = ModelDesc.from_formula(formula)
18 if INTERCEPT in formula.rhs_termlist:
19 formula.rhs_termlist.remove(INTERCEPT)
TypeError: from_formula() takes exactly 3 arguments (2 given)
Ok it was a patsy version probem. I had 0.3.0, updated to 0.4.1 fixed it.