class_docstr: Base class for evaluating multiple methods for an ED/Optimisation task. 
class_docstr_tok: ["Base","class","for","evaluating","multiple","methods","for","an","ED\/Optimisation","task","."]
docstr: Constructor.
  random_seed_val: If None we will not change the random seed. If it is
    'time' we will set it to a time based value. If it is an int, we will set
    the seed to that value.
docstr_tok: ["Constructor",".","random_seed_val",":","If","None","we","will","not","change","the","random","seed",".","If","it","is","'time","'","we","will","set","it","to","a","time","based","value",".","If","it","is","an","int",",","we","will","set","the","seed","to","that","value","."]
code: def __init__(
      self,
      study_name,
      num_trials,
      save_file_name,
      save_file_extension="",
      reporter="default",
      random_seed_val="time",
  ):
      """Constructor.
      random_seed_val: If None we will not change the random seed. If it is
        'time' we will set it to a time based value. If it is an int, we will set
        the seed to that value.
      """
      self.study_name = study_name
      self.num_trials = num_trials
      if save_file_extension == "":
          save_file_parts = save_file_name.split(".")
          save_file_name = save_file_parts[0]
          save_file_extension = save_file_parts[1]
      self.save_file_extension = save_file_extension
      self.save_file_full_name = (
          save_file_name + "." + self.save_file_extension
      )
      self.pickle_file_name = save_file_name + ".p"
      self.reporter = get_reporter(reporter)
      self.to_be_saved = Namespace(study_name=self.study_name)
      self.data_not_to_be_mat_saved = []
      self.data_not_to_be_pickled = []
      # We will need these going forward.
      self.trial_iter = 0
      # Set the random seed
      if random_seed_val is not None:
          if random_seed_val == "time":
              random_seed_val = int(time() * 100) % 100000
          self.reporter.writeln(
              "Setting random seed to %d." % (random_seed_val)
          )
          np.random.seed(random_seed_val)
          random.seed(random_seed_val)
  
file_path: dragonfly/dragonfly/utils/method_evaluator.py
imports: from argparse import Namespace
  import random
  from time import time
  import pickle
  from scipy.io import savemat
  import numpy
  from .reporters import get_reporter
label_desc: Use image node_id 1 to create a new BaseMethodEvaluator object from inherited base classes: object with example: obj = BaseMethodEvaluator(study_name, num_trials, save_file_name, save_file_extension, reporter, random_seed_val)