class_docstr: Class to run multiple iterative algorithms and compare the results.
docstr: Run an iterative update method
docstr_tok: ["Run","an","iterative","update","method"]
code: def add_algo(self, update_rule, name):
      """Run an iterative update method"""
      _, dim = self.lrp.num_samples, self.lrp.dim
      wint_un = np.random.multivariate_normal(
          np.zeros(dim), np.eye(dim)
      )
      w_int = wint_un / np.linalg.norm(wint_un)
      cutoff_norm = (
          100 * np.linalg.norm(self.w_opt)
          + 100 * np.linalg.norm(w_int)
          + 100
      )
      w_cur = w_int
      params = [w_cur]
      start_t = time.time()
      wall_clock = [0]
      for _ in range(self.iters):
          w_cur = update_rule(w_cur, self.lrp, self.hyper_params)
          if np.linalg.norm(w_cur) > cutoff_norm:
              w_cur = w_int
              print("Stop Things Exploding!")
          params.append(w_cur)
          wall_clock.append(time.time() - start_t)
      self.clock_time.append(wall_clock)
      self.params.append(params)
      self.names.append(name)
  
imports: import time
  from my_logistic_regression import MyLogisticRegression
  import numpy
label_desc: Use image node_id 2 for calling the CompareAlgs obj's underlying member method code with example usage: obj.add_algo(update_rule, name) without return types