scikit-learn-contrib / py-earth

A Python implementation of Jerome Friedman's Multivariate Adaptive Regression Splines
http://contrib.scikit-learn.org/py-earth/
BSD 3-Clause "New" or "Revised" License
457 stars 122 forks source link

Test failure with sciki-learn master #101

Closed jcrudy closed 8 years ago

jcrudy commented 8 years ago

@mblondel got a test failure using sklearn master.

I got a test failure.

======================================================================
ERROR: pyearth.test.test_earth.test_untrained
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/mblondel/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/mblondel/Desktop/projects/py-earth/pyearth/test/test_earth.py", line 436, in test_untrained
    assert_raises(NotFittedError, model.predict, X)
  File "/Users/mblondel/anaconda/lib/python2.7/unittest/case.py", line 473, in assertRaises
    callableObj(*args, **kwargs)
  File "/Users/mblondel/Desktop/projects/py-earth/pyearth/earth.py", line 851, in predict
    B = self.transform(X, missing)
  File "/Users/mblondel/Desktop/projects/py-earth/pyearth/earth.py", line 1004, in transform
    check_is_fitted(self, "basis_")
  File "/Users/mblondel/Desktop/projects/scikit-learn/sklearn/utils/validation.py", line 685, in check_is_fitted
    raise _NotFittedError(msg % {'name': type(estimator).__name__})
NotFittedError: This Earth instance is not fitted yet. Call 'fit' with appropriate arguments before using this method.

----------------------------------------------------------------------

FYI, I am using scikit-learn master.

mblondel commented 8 years ago

Fixed by #103.