yandex / rep

Machine Learning toolbox for Humans
http://yandex.github.io/rep/
Other
687 stars 144 forks source link

Factory doesn't fit given plain numpy arrays #9

Closed anaderi closed 9 years ago

anaderi commented 9 years ago

i.e. this works:

X = XGBoostClassifier()
X.fit(D.data['X_train'], D.data['Y_train'])

and this doesn't:

factory = ClassifiersFactory()
factory.add_classifier('ada', AdaBoostClassifier(n_estimators=100))
factory['xgb'] = XGBoostClassifier()
factory.fit(D.data['X_train'], D.data['Y_train'])

complaining:

/usr/local/lib/python2.7/dist-packages/rep/metaml/factory.pyc in fit(self, X, y, sample_weight, parallel_profile, features)
     48         :return: self
     49         """
---> 50         assert isinstance(X, pandas.DataFrame), 'The passed '
     51         if features is not None:
     52             for name, estimator in self.items():

AssertionError: The passed 
arogozhnikov commented 9 years ago

Fixed, removed that assertion. Check of data is done by estimators. https://github.com/yandex/rep/commit/d119c3f08e72c6b807428d3004b3d57806a8229a