class_docstr: Audit attack class. Generates poisoning, then runs auditing algorithm.
class_docstr_tok: ["Audit","attack","class",".","Generates","poisoning",",","then","runs","auditing","algorithm","."]
docstr: Complete auditing algorithm. Generates poisoning if necessary.
docstr_tok: ["Complete","auditing","algorithm",".","Generates","poisoning","if","necessary","."]
code: def run(
      self,
      pois_ct,
      attack_type,
      num_trials,
      alpha=0.05,
      threshold=None,
      l2_norm=10,
  ):
      """Complete auditing algorithm. Generates poisoning if necessary."""
      if self.poisoning is None:
          self.poisoning = self.make_poisoning(
              pois_ct, attack_type, l2_norm
          )
          self.poisoning["data"] = self.poisoning[pois_ct]
  
      poison_scores, unpois_scores = self.run_experiments(num_trials)
  
      results = compute_results(
          poison_scores,
          unpois_scores,
          pois_ct,
          alpha=alpha,
          threshold=threshold,
      )
      return results
  
file_path: privacy/research/audit_2020/audit.py
imports: import numpy
  from statsmodels.stats import proportion
  import attacks
label_desc: Use image node_id 4 for calling the AuditAttack obj's underlying member method code with example usage: obj.run(pois_ct, attack_type, num_trials, alpha, threshold, l2_norm) and returns: results