---------------------------------------------------------------------------
NotFittedError Traceback (most recent call last)
<ipython-input-8-4edd7facdf96> in <module>()
----> 1 print clf.predict(iris.data)
/home/ilmira/.conda/envs/readmision/lib/python2.7/site-packages/sklearn/svm/base.pyc in predict(self, X)
546 Class labels for samples in X.
547 """
--> 548 y = super(BaseSVC, self).predict(X)
549 return self.classes_.take(np.asarray(y, dtype=np.intp))
550
/home/ilmira/.conda/envs/readmision/lib/python2.7/site-packages/sklearn/svm/base.pyc in predict(self, X)
306 y_pred : array, shape (n_samples,)
307 """
--> 308 X = self._validate_for_predict(X)
309 predict = self._sparse_predict if self._sparse else self._dense_predict
310 return predict(X)
/home/ilmira/.conda/envs/readmision/lib/python2.7/site-packages/sklearn/svm/base.pyc in _validate_for_predict(self, X)
435
436 def _validate_for_predict(self, X):
--> 437 check_is_fitted(self, 'support_')
438
439 X = check_array(X, accept_sparse='csr', dtype=np.float64, order="C")
/home/ilmira/.conda/envs/readmision/lib/python2.7/site-packages/sklearn/utils/validation.pyc in check_is_fitted(estimator, attributes, msg, all_or_any)
766
767 if not all_or_any([hasattr(estimator, attr) for attr in attributes]):
--> 768 raise NotFittedError(msg % {'name': type(estimator).__name__})
769
770
NotFittedError: This SVC instance is not fitted yet. Call 'fit' with appropriate arguments before using this method.