-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Closed
Labels
Description
Subj. This seems to me to be a wrong approach, moreover this drives to such mistakes:
AdaBoostClassifier(algorithm="SAMME", base_estimator=SVC()).fit(trainX, trainY).predict_proba(testX)
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
in ()
----> 1 AdaBoostClassifier(algorithm="SAMME", base_estimator=SVC()).fit(trainX, trainY).predict_proba(testX)
/Library/Python/2.7/site-packages/sklearn/ensemble/weight_boosting.pyc in predict_proba(self, X)
716 proba = sum(estimator.predict_proba(X) * w
717 for estimator, w in zip(self.estimators_,
--> 718 self.estimator_weights_))
719
720 proba /= self.estimator_weights_.sum()
/Library/Python/2.7/site-packages/sklearn/ensemble/weight_boosting.pyc in ((estimator, w))
715 else: # self.algorithm == "SAMME"
716 proba = sum(estimator.predict_proba(X) * w
--> 717 for estimator, w in zip(self.estimators_,
718 self.estimator_weights_))
719
/Library/Python/2.7/site-packages/sklearn/svm/base.pyc in predict_proba(self, X)
493 if not self.probability:
494 raise NotImplementedError(
--> 495 "probability estimates must be enabled to use this method")
496
497 if self._impl not in ('c_svc', 'nu_svc'):
NotImplementedError: probability estimates must be enabled to use this method