class_docstr: Class performing certified adversarial training from methods such as
  
  | Paper link: http://proceedings.mlr.press/v80/mirman18b/mirman18b.pdf
  | Paper link: https://arxiv.org/pdf/1810.12715.pdf
class_docstr_tok: ["Class","performing","certified","adversarial","training","from","methods","such","as","|","Paper","link",":","http",":","\/\/proceedings.mlr.press\/v80\/mirman18b\/mirman18b.pdf","|","Paper","link",":","https",":","\/\/arxiv.org\/pdf\/1810.12715.pdf"]
docstr: Perform prediction using the adversarially trained classifier using zonotopes
  
  :param x: The datapoint, either:
  
          1. In the interval format of x[batch_size, 2, feature_1, feature_2, ...]
             where axis=1 corresponds to the [lower, upper] bounds.
  
          2. Or in regular concrete form, in which case the bounds/limits need to be supplied.
  :param is_interval: if the datapoint is already in the correct interval format.
  :param bounds: The perturbation range.
  :param limits: The clipping to apply to the interval data.
  :param batch_size: batch size to use when looping through the data
docstr_tok: ["Perform","prediction","using","the","adversarially","trained","classifier","using","zonotopes",":","param","x",":","The","datapoint",",","either",":","1",".","In","the","interval","format","of","x","[","batch_size",",","2",",","feature_1",",","feature_2",",","...","]","where","axis=1","corresponds","to","the","[","lower",",","upper","]","bounds",".","2",".","Or","in","regular","concrete","form",",","in","which","case","the","bounds\/limits","need","to","be","supplied",".",":","param","is_interval",":","if","the","datapoint","is","already","in","the","correct","interval","format",".",":","param","bounds",":","The","perturbation","range",".",":","param","limits",":","The","clipping","to","apply","to","the","interval","data",".",":","param","batch_size",":","batch","size","to","use","when","looping","through","the","data"]
code: def predict_intervals(
      self,
      x: np.ndarray,
      is_interval: bool = False,
      bounds: Optional[Union[float, List[float], np.ndarray]] = None,
      limits: Optional[Union[List[float], np.ndarray]] = None,
      batch_size: int = 128,
      **kwargs,
  ) -> np.ndarray:
      """
      Perform prediction using the adversarially trained classifier using zonotopes
  
      :param x: The datapoint, either:
  
              1. In the interval format of x[batch_size, 2, feature_1, feature_2, ...]
                 where axis=1 corresponds to the [lower, upper] bounds.
  
              2. Or in regular concrete form, in which case the bounds/limits need to be supplied.
      :param is_interval: if the datapoint is already in the correct interval format.
      :param bounds: The perturbation range.
      :param limits: The clipping to apply to the interval data.
      :param batch_size: batch size to use when looping through the data
      """
  
      if self.classifier.model.forward_mode != "abstract":
          raise ValueError(
              "For interval predictions, the model must be running in abstract mode. If a concrete "
              "prediction is wanted then use predict instead"
          )
      return self.classifier.predict_intervals(
          x, is_interval, bounds, limits, batch_size, **kwargs
      )
  
file_path: adversarial-robustness-toolbox/art/defences/trainer/ibp_certified_trainer_pytorch.py
imports: import logging
  import random
  import sys
  import numpy
  from sklearn.utils import shuffle
  from tqdm import tqdm
  from art.defences.trainer.trainer import Trainer
  from art.attacks.evasion.projected_gradient_descent.projected_gradient_descent import ProjectedGradientDescent
  from art.utils import check_and_transform_label_format
label_desc: Use image node_id 5 for calling the AdversarialTrainerCertifiedIBPPyTorch obj's underlying member method code with example usage: obj.predict_intervals(x, is_interval, bounds, limits, batch_size) and returns: self