class_docstr: Base class for AdaBoost estimators.
  
  Warning: This class should not be used directly. Use derived classes
  instead.
class_docstr_tok: ["Base","class","for","AdaBoost","estimators",".","Warning",":","This","class","should","not","be","used","directly",".","Use","derived","classes","instead","."]
docstr: Ensure that X is in the proper format
docstr_tok: ["Ensure","that","X","is","in","the","proper","format"]
code: def _validate_X_predict(self, X):
      """Ensure that X is in the proper format"""
      if self.base_estimator is None or isinstance(
          self.base_estimator, (BaseDecisionTree, BaseForest)
      ):
          X = check_array(X, accept_sparse="csr", dtype=DTYPE)
  
      else:
          X = check_array(X, accept_sparse=["csr", "csc", "coo"])
  
      return X
  
imports: from abc import ABCMeta, abstractmethod
  import numpy
  from numpy.core.umath_tests import inner1d
  from .base import BaseEnsemble
  from ..base import ClassifierMixin, RegressorMixin, is_regressor
  from ..externals import six
  from ..externals.six.moves import zip
  from ..externals.six.moves import xrange
  from .forest import BaseForest
  from ..tree import DecisionTreeClassifier, DecisionTreeRegressor
  from ..tree.tree import BaseDecisionTree
  from ..tree._tree import DTYPE
  from ..utils import check_array, check_X_y, check_random_state
  from ..metrics import accuracy_score, r2_score
  from sklearn.utils.validation import has_fit_parameter, check_is_fitted
label_desc: Use image node_id 6 for calling the BaseWeightBoosting obj's underlying member method code with example usage: obj._validate_X_predict(X) and returns: X