Replace inner1d by standard numpy constructs.
numpy.core.umath_tests has been moved to private modules in numpy 1.15.0.dev.
@@ -26,7 +26,6 @@ The module structure is the following:
from abc import ABCMeta, abstractmethod
import numpy as np
-from numpy.core.umath_tests import inner1d
from .base import BaseEnsemble
from ..base import ClassifierMixin, RegressorMixin, is_regressor, is_classifier
@@ -522,8 +521,8 @@ class AdaBoostClassifier(BaseWeightBoosting, ClassifierMixin):
# Boost weight using multi-class AdaBoost SAMME.R alg
estimator_weight = (-1. * self.learning_rate
- * (((n_classes - 1.) / n_classes) *
- inner1d(y_coding, np.log(y_predict_proba))))
+ * ((n_classes - 1.) / n_classes)
+ * (y_coding * np.log(y_predict_proba)).sum(axis=1))
# Only boost the weights if it will fit again
if not iboost == self.n_estimators - 1:
