class_docstr: Class providing functionality for computing operations related to getting lower and upper bounds on zonotopes.
class_docstr_tok: ["Class","providing","functionality","for","computing","operations","related","to","getting","lower","and","upper","bounds","on","zonotopes","."]
docstr: To perform the certification we subtract the zonotope of "class_to_consider"
  from the zonotope of the predicted class.
  
  :param predicted_class: class the model predicted.
  :param class_to_consider: class to check if the model could have classified to it.
  :param cent: center/zeroth zonotope term.
  :param eps: zonotope error terms.
  :return: True/False if the point has been certified
docstr_tok: ["To","perform","the","certification","we","subtract","the","zonotope","of","``","class_to_consider","''","from","the","zonotope","of","the","predicted","class",".",":","param","predicted_class",":","class","the","model","predicted",".",":","param","class_to_consider",":","class","to","check","if","the","model","could","have","classified","to","it",".",":","param","cent",":","center\/zeroth","zonotope","term",".",":","param","eps",":","zonotope","error","terms",".",":","return",":","True\/False","if","the","point","has","been","certified"]
code: def certify_via_subtraction(
      predicted_class: int,
      class_to_consider: int,
      cent: np.ndarray,
      eps: np.ndarray,
  ) -> bool:
      """
      To perform the certification we subtract the zonotope of "class_to_consider"
      from the zonotope of the predicted class.
  
      :param predicted_class: class the model predicted.
      :param class_to_consider: class to check if the model could have classified to it.
      :param cent: center/zeroth zonotope term.
      :param eps: zonotope error terms.
      :return: True/False if the point has been certified
      """
      diff_in_bias = cent[class_to_consider] - cent[predicted_class]
      diff_in_eps = eps[:, class_to_consider] - eps[:, predicted_class]
      lbs = np.sum(-1 * np.abs(diff_in_eps)) + diff_in_bias
      ubs = np.sum(np.abs(diff_in_eps)) + diff_in_bias
  
      return np.sign(lbs) < 0 and np.sign(ubs) < 0
  
imports: from typing import Tuple, Union
  import numpy
  import torch
label_desc: Use image node_id 4 for calling the ZonoBounds obj's underlying member method code with example usage: obj.certify_via_subtraction(predicted_class, class_to_consider, cent, eps) and returns: unknown