class_docstr: A recipe involves both grid search and random search, only for LSTM.
docstr: __init__()
  Constructor.
  
  :param lstm_1_units: random search candidates for num of lstm_1_units
  :param lstm_2_units: grid search candidates for num of lstm_1_units
  :param batch_size: grid search candidates for batch size
  :param num_rand_samples: number of hyper-param configurations sampled randomly
  :param look_back: the length to look back, either a tuple with 2 int values,
    which is in format is (min len, max len), or a single int, which is
    a fixed length to look back.
  :param training_iteration: no. of iterations for training (n epochs) in trials
  :param epochs: no. of epochs to train in each iteration
docstr_tok: ["__init__","(",")","Constructor",".",":","param","lstm_1_units",":","random","search","candidates","for","num","of","lstm_1_units",":","param","lstm_2_units",":","grid","search","candidates","for","num","of","lstm_1_units",":","param","batch_size",":","grid","search","candidates","for","batch","size",":","param","num_rand_samples",":","number","of","hyper-param","configurations","sampled","randomly",":","param","look_back",":","the","length","to","look","back",",","either","a","tuple","with","2","int","values",",","which","is","in","format","is","(","min","len",",","max","len",")",",","or","a","single","int",",","which","is","a","fixed","length","to","look","back",".",":","param","training_iteration",":","no",".","of","iterations","for","training","(","n","epochs",")","in","trials",":","param","epochs",":","no",".","of","epochs","to","train","in","each","iteration"]
code: def __init__(
      self,
      num_rand_samples=1,
      epochs=5,
      training_iteration=10,
      look_back=2,
      lstm_1_units=[16, 32, 64, 128],
      lstm_2_units=[16, 32, 64],
      batch_size=[32, 64],
  ):
      """
      __init__()
      Constructor.
  
      :param lstm_1_units: random search candidates for num of lstm_1_units
      :param lstm_2_units: grid search candidates for num of lstm_1_units
      :param batch_size: grid search candidates for batch size
      :param num_rand_samples: number of hyper-param configurations sampled randomly
      :param look_back: the length to look back, either a tuple with 2 int values,
        which is in format is (min len, max len), or a single int, which is
        a fixed length to look back.
      :param training_iteration: no. of iterations for training (n epochs) in trials
      :param epochs: no. of epochs to train in each iteration
      """
      super(self.__class__, self).__init__()
      # -- runtime params
      self.num_samples = num_rand_samples
      self.training_iteration = training_iteration
  
      # -- model params
      self.past_seq_config = PastSeqParamHandler.get_past_seq_config(
          look_back
      )
      self.lstm_1_units_config = hp.choice(lstm_1_units)
      self.lstm_2_units_config = hp.grid_search(lstm_2_units)
      self.dropout_2_config = hp.uniform(0.2, 0.5)
  
      # -- optimization params
      self.lr = hp.uniform(0.001, 0.01)
      self.batch_size = hp.grid_search(batch_size)
      self.epochs = epochs
  
imports: from bigdl.chronos.autots.deprecated.config.base import Recipe
  from bigdl.orca.automl import hp
  from bigdl.chronos.utils import deprecated
label_desc: Use image node_id 1 to create a new LSTMGridRandomRecipe object from inherited base classes: Recipe with example: obj = LSTMGridRandomRecipe(num_rand_samples, epochs, training_iteration, look_back, lstm_1_units, lstm_2_units, batch_size)