original_docstring: 
          Saves the averaged metrics in a json file.
          
docstring: Saves the averaged metrics in a json file.
docstring_tokens: Saves the averaged metrics in a json file .
code: def save_metrics(self, res_dir, dataset, name="ARL"):
          """
          Saves the averaged metrics in a json file.
          """
  
          metrics = {
              "auc_avg_final": self.auc_avg[-1],
              "auc_std_final": self.auc_std[-1],
              "auc_min_avg_final": self.auc_min_avg[-1],
              "auc_min_std_final": self.auc_min_std[-1],
              "auc_macro_avg_final": self.auc_macro_avg[-1],
              "auc_macro_std_final": self.auc_macro_std[-1],
              "auc_auc_minority_avg": self.auc_minority_avg[-1],
              "auc_auc_minority_std": self.auc_minority_std[-1],
              "tn": self.posnegs_avg[0],
              "fp": self.posnegs_avg[1],
              "fn": self.posnegs_avg[2],
              "tp": self.posnegs_avg[3],
              "posnegs_avg": self.posnegs_avg.tolist(),
              "acc_avg": self.acc_avg.tolist(),
          }
          json.dump(metrics, open("{}{}_{}.json".format(res_dir, dataset, 
              name), 'w'))
code_tokens: def save_metrics ( self , res_dir , dataset , name = "ARL" ) : metrics = { "auc_avg_final" : self . auc_avg [ - 1 ] , "auc_std_final" : self . auc_std [ - 1 ] , "auc_min_avg_final" : self . auc_min_avg [ - 1 ] , "auc_min_std_final" : self . auc_min_std [ - 1 ] , "auc_macro_avg_final" : self . auc_macro_avg [ - 1 ] , "auc_macro_std_final" : self . auc_macro_std [ - 1 ] , "auc_auc_minority_avg" : self . auc_minority_avg [ - 1 ] , "auc_auc_minority_std" : self . auc_minority_std [ - 1 ] , "tn" : self . posnegs_avg [ 0 ] , "fp" : self . posnegs_avg [ 1 ] , "fn" : self . posnegs_avg [ 2 ] , "tp" : self . posnegs_avg [ 3 ] , "posnegs_avg" : self . posnegs_avg . tolist ( ) , "acc_avg" : self . acc_avg . tolist ( ) , } json . dump ( metrics , open ( "{}{}_{}.json" . format ( res_dir , dataset , name ) , 'w' ) )
short_docstring: Saves the averaged metrics in a json file.
short_docstring_tokens: Saves the averaged metrics in a json file .
comment: """
          Saves the averaged metrics in a json file.
          """