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","."]
code: def _check_X(self, X):
      # Only called to validate X in non-fit methods, therefore reset=False
      return self._validate_data(
          X,
          accept_sparse=["csr", "csc"],
          ensure_2d=True,
          allow_nd=True,
          dtype=None,
          reset=False,
      )
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  from numbers import Integral, Real
  import numpy
  from scipy.special import xlogy
  from ..base import ClassifierMixin, RegressorMixin, _fit_context, is_classifier, is_regressor
  from ..metrics import accuracy_score, r2_score
  from ..tree import DecisionTreeClassifier, DecisionTreeRegressor
  from ..utils import _safe_indexing, check_random_state
  from ..utils._param_validation import HasMethods, Interval, StrOptions
  from ..utils.extmath import softmax, stable_cumsum
  from ..utils.validation import _check_sample_weight, _num_samples, check_is_fitted, has_fit_parameter
  from ._base import BaseEnsemble
label_desc: Use image node_id 2 for calling the BaseWeightBoosting obj's underlying member method code with example usage: obj._check_X(X) and returns: self