class_docstr: Our Method: Double Noise Mechanism
docstr: Initializer of the double noise mechanism
  
  lr = an instance of MyLogisticRegression
  type_reg = minimum eigenvalue modification type, it can be either 'add' or
  'clip'
  curvature_info = type of the second-order information
docstr_tok: ["Initializer","of","the","double","noise","mechanism","lr","=","an","instance","of","MyLogisticRegression","type_reg","=","minimum","eigenvalue","modification","type",",","it","can","be","either","'add","'","or","'clip'","curvature_info","=","type","of","the","second-order","information"]
code: def __init__(self, lrp, type_reg="add", curvature_info="hessian"):
      """Initializer of the double noise mechanism
  
      lr = an instance of MyLogisticRegression
      type_reg = minimum eigenvalue modification type, it can be either 'add' or
      'clip'
      curvature_info = type of the second-order information
      """
      self.type_reg = type_reg
      self.curvature_info = curvature_info
      if self.curvature_info == "hessian":
          self.hess = lrp.hess_wor
      elif self.curvature_info == "ub":
          self.hess = lrp.upperbound_wor
  
imports: import time
  from my_logistic_regression import MyLogisticRegression
  import numpy
label_desc: Use image node_id 1 to create a new DoubleNoiseMech object  with example: obj = DoubleNoiseMech(lrp, type_reg, curvature_info)