class_docstr: Takes another algorithm and repeats every hyperparameter configuration a
  given number of times. The wrapped algorithm will be passed the mean
  objective values of the repeated experiments.
  
  Args:
      algorithm (sherpa.algorithms.Algorithm): the algorithm to produce
          hyperparameter configurations.
      num_times (int): the number of times to repeat each configuration.
      wait_for_completion (bool): only relevant when running in parallel with
          max_concurrent > 1. Means that the algorithm won't issue the next
          suggestion until all repetitions are completed. This can be useful
          when the repeats have impact on sequential decision making in the
          wrapped algorithm.
      agg (bool): whether to aggregate repetitions before passing them to the
          parameter generating algorithm.
class_docstr_tok: ["Takes","another","algorithm","and","repeats","every","hyperparameter","configuration","a","given","number","of","times",".","The","wrapped","algorithm","will","be","passed","the","mean","objective","values","of","the","repeated","experiments",".","Args",":","algorithm","(","sherpa.algorithms.Algorithm",")",":","the","algorithm","to","produce","hyperparameter","configurations",".","num_times","(","int",")",":","the","number","of","times","to","repeat","each","configuration",".","wait_for_completion","(","bool",")",":","only","relevant","when","running","in","parallel","with","max_concurrent",">","1",".","Means","that","the","algorithm","wo","n't","issue","the","next","suggestion","until","all","repetitions","are","completed",".","This","can","be","useful","when","the","repeats","have","impact","on","sequential","decision","making","in","the","wrapped","algorithm",".","agg","(","bool",")",":","whether","to","aggregate","repetitions","before","passing","them","to","the","parameter","generating","algorithm","."]
code: def __init__(
      self, algorithm, num_times=5, wait_for_completion=False, agg=False
  ):
      assert algorithm.allows_repetition
      self.algorithm = algorithm
      self.num_times = num_times
      self.queue = collections.deque()
      self.prev_completed = 0
      self.wait_for_completion = wait_for_completion
      self.agg = agg
  
imports: import os
  import random
  import numpy
  import logging
  import sherpa
  import pandas
  import sklearn.gaussian_process
  from sherpa.core import Choice, Continuous, Discrete, Ordinal, AlgorithmState
  from sherpa.core import rng
  import sklearn.model_selection
  import collections
label_desc: Use image node_id 1 to create a new Repeat object from inherited base classes: Algorithm with example: obj = Repeat(algorithm, num_times, wait_for_completion, agg)