class_docstr: Class for black-box regressors.
docstr: Perform prediction for a batch of inputs.
  
  :param x: Input samples.
  :param batch_size: Size of batches.
  :return: Array of predictions of shape `(nb_inputs, nb_classes)`.
docstr_tok: ["Perform","prediction","for","a","batch","of","inputs",".",":","param","x",":","Input","samples",".",":","param","batch_size",":","Size","of","batches",".",":","return",":","Array","of","predictions","of","shape","`","(","nb_inputs",",","nb_classes",")","`","."]
code: def predict(
      self, x: np.ndarray, batch_size: int = 128, **kwargs
  ) -> np.ndarray:
      """
      Perform prediction for a batch of inputs.
  
      :param x: Input samples.
      :param batch_size: Size of batches.
      :return: Array of predictions of shape `(nb_inputs, nb_classes)`.
      """
      from art.config import ART_NUMPY_DTYPE
  
      # Apply preprocessing
      x_preprocessed, _ = self._apply_preprocessing(
          x, y=None, fit=False
      )
  
      # Run predictions with batching
      predictions = np.zeros(
          (x_preprocessed.shape[0],), dtype=ART_NUMPY_DTYPE
      )
      for batch_index in range(
          int(np.ceil(x_preprocessed.shape[0] / float(batch_size)))
      ):
          begin, end = (
              batch_index * batch_size,
              min(
                  (batch_index + 1) * batch_size,
                  x_preprocessed.shape[0],
              ),
          )
          predictions[begin:end] = self.predict_fn(
              x_preprocessed[begin:end]
          )
  
      # Apply postprocessing
      predictions = self._apply_postprocessing(
          preds=predictions, fit=False
      )
  
      return predictions
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from functools import total_ordering
  import logging
  from typing import Callable, List, Optional, Union, Tuple, TYPE_CHECKING
  import numpy
  from art.estimators.estimator import BaseEstimator
  from art.estimators.regression.regressor import RegressorMixin, Regressor
  from art.estimators.classification import BlackBoxClassifier
label_desc: Use image node_id 5 for calling the BlackBoxRegressor obj's underlying member method code with example usage: obj.predict(x, batch_size) and returns: predictions