---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/home/andy/checkout/scikit-learn/sklearn/utils/testing.py in assert_raise_message(exceptions, message, function, *args, **kwargs)
359 try:
--> 360 function(*args, **kwargs)
361 except exceptions as e:
<ipython-input-12-8b5d1d1d5230> in predict(self, X)
31
---> 32 closest = np.argmin(euclidean_distances(X, self.X_), axis=1)
33 return self.y_[closest]
AttributeError: 'TemplateClassifier' object has no attribute 'X_'
During handling of the above exception, another exception occurred:
AssertionError Traceback (most recent call last)
<ipython-input-13-579547bc9f15> in <module>()
----> 1 check_estimator(TemplateClassifier)
/home/andy/checkout/scikit-learn/sklearn/utils/estimator_checks.py in check_estimator(Estimator)
249 for check in _yield_all_checks(name, Estimator):
250 try:
--> 251 check(name, Estimator)
252 except SkipTest as message:
253 # the only SkipTest thrown currently results from not
/home/andy/checkout/scikit-learn/sklearn/utils/testing.py in wrapper(*args, **kwargs)
290 with warnings.catch_warnings():
291 warnings.simplefilter("ignore", self.category)
--> 292 return fn(*args, **kwargs)
293
294 return wrapper
/home/andy/checkout/scikit-learn/sklearn/utils/estimator_checks.py in check_estimators_unfitted(name, Estimator)
1179 if hasattr(est, 'predict'):
1180 assert_raise_message((AttributeError, ValueError), msg,
-> 1181 est.predict, X)
1182
1183 if hasattr(est, 'decision_function'):
/home/andy/checkout/scikit-learn/sklearn/utils/testing.py in assert_raise_message(exceptions, message, function, *args, **kwargs)
364 raise AssertionError("Error message does not include the expected"
365 " string: %r. Observed error message: %r" %
--> 366 (message, error_message))
367 else:
368 # concatenate exception names
AssertionError: Error message does not include the expected string: 'fit'. Observed error message: "'TemplateClassifier' object has no attribute 'X_'"