class_docstr: Base class for all pipeline objects.
  
  Notes
  -----
  This class should not be instantiated, only subclassed.
docstr: Predict the classes using the selected model.
  
  Parameters
  ----------
  X : array-like, shape = (n_samples, n_features)
  
  batch_size: int or None, defaults to None
      batch_size controls whether the pipeline will be
      called on small chunks of the data. Useful when calling the
      predict method on the whole array X results in a MemoryError.
  
  Returns
  -------
  array, shape=(n_samples,) if n_classes == 2 else (n_samples, n_classes)
      Returns the predicted values
docstr_tok: ["Predict","the","classes","using","the","selected","model",".","Parameters","--","--","--","--","--","X",":","array-like",",","shape","=","(","n_samples",",","n_features",")","batch_size",":","int","or","None",",","defaults","to","None","batch_size","controls","whether","the","pipeline","will","be","called","on","small","chunks","of","the","data",".","Useful","when","calling","the","predict","method","on","the","whole","array","X","results","in","a","MemoryError",".","Returns","--","--","--","-","array",",","shape=","(","n_samples",",",")","if","n_classes","==","2","else","(","n_samples",",","n_classes",")","Returns","the","predicted","values"]
code: def predict(self, X, batch_size=None):
      """Predict the classes using the selected model.
  
      Parameters
      ----------
      X : array-like, shape = (n_samples, n_features)
  
      batch_size: int or None, defaults to None
          batch_size controls whether the pipeline will be
          called on small chunks of the data. Useful when calling the
          predict method on the whole array X results in a MemoryError.
  
      Returns
      -------
      array, shape=(n_samples,) if n_classes == 2 else (n_samples, n_classes)
          Returns the predicted values"""
  
      if batch_size is None:
          return super().predict(X).astype(self._output_dtype)
      else:
          if not isinstance(batch_size, int):
              raise ValueError(
                  "Argument 'batch_size' must be of type int, "
                  "but is '%s'" % type(batch_size)
              )
          if batch_size <= 0:
              raise ValueError(
                  "Argument 'batch_size' must be positive, "
                  "but is %d" % batch_size
              )
  
          else:
              if self.num_targets == 1:
                  y = np.zeros((X.shape[0],), dtype=self._output_dtype)
              else:
                  y = np.zeros(
                      (X.shape[0], self.num_targets),
                      dtype=self._output_dtype,
                  )
  
              # Copied and adapted from the scikit-learn GP code
              for k in range(
                  max(1, int(np.ceil(float(X.shape[0]) / batch_size)))
              ):
                  batch_from = k * batch_size
                  batch_to = min([(k + 1) * batch_size, X.shape[0]])
                  y[batch_from:batch_to] = self.predict(
                      X[batch_from:batch_to], batch_size=None
                  )
  
              return y
  
imports: from abc import ABCMeta
  from typing import Dict, Optional, Union
  import numpy
  import scipy.sparse
  from ConfigSpace import Configuration
  from sklearn.pipeline import Pipeline
  import autosklearn.pipeline.create_searchspace_util
  from autosklearn.askl_typing import FEAT_TYPE_TYPE
  from .components.base import AutoSklearnChoice, AutoSklearnComponent
label_desc: Use image node_id 10 for calling the BasePipeline obj's underlying member method code with example usage: obj.predict(X, batch_size) and returns: super, y