class_docstr: Proposes new trials using a linear model.
  
  The model suggests an architecture no deeper than those in the trials.
  Sometimes (by a coin flip) adds one layer of depth to the suggestion.
class_docstr_tok: ["Proposes","new","trials","using","a","linear","model",".","The","model","suggests","an","architecture","no","deeper","than","those","in","the","trials",".","Sometimes","(","by","a","coin","flip",")","adds","one","layer","of","depth","to","the","suggestion","."]
docstr: Pads architectures with EMPTY_BLOCK and call _predict_best_architecture.
  
  Variable-length architectures are padded into fixed dimensionality
  at either head or base, as determined by spec.network_alignment.
  
  Args:
    architectures: List of iterables of block_builder.BlockType values (or
      integers).
    losses: Iterable of floats: objective value to be minimized.
  
  Returns:
    loss: Estimated loss value of best architecture according to the model.
    trimmed: Best architecture according to the model.
docstr_tok: ["Pads","architectures","with","EMPTY_BLOCK","and","call","_predict_best_architecture",".","Variable-length","architectures","are","padded","into","fixed","dimensionality","at","either","head","or","base",",","as","determined","by","spec.network_alignment",".","Args",":","architectures",":","List","of","iterables","of","block_builder.BlockType","values","(","or","integers",")",".","losses",":","Iterable","of","floats",":","objective","value","to","be","minimized",".","Returns",":","loss",":","Estimated","loss","value","of","best","architecture","according","to","the","model",".","trimmed",":","Best","architecture","according","to","the","model","."]
code: def _suggest_by_padding(self, architectures, losses):
      """Pads architectures with EMPTY_BLOCK and call _predict_best_architecture.
  
      Variable-length architectures are padded into fixed dimensionality
      at either head or base, as determined by spec.network_alignment.
  
      Args:
        architectures: List of iterables of block_builder.BlockType values (or
          integers).
        losses: Iterable of floats: objective value to be minimized.
  
      Returns:
        loss: Estimated loss value of best architecture according to the model.
        trimmed: Best architecture according to the model.
      """
  
      depths = np.array([len(arch) for arch in architectures])
      maxdepth = np.amax(depths)
      extended = np.array(
          [
              self._pad_architecture(arch, maxdepth)
              for arch in architectures
          ]
      )
      loss, suggestion = self._predict_best_architecture(
          extended, losses
      )
      trimmed = np.array(
          [
              block
              for block in suggestion
              if block != block_builder.BlockType.EMPTY_BLOCK.value
          ]
      )
      return loss, trimmed
  
file_path: model_search/model_search/search/linear_model.py
imports: from model_search import block_builder
  from model_search.architecture import architecture_utils
  from model_search.proto import phoenix_spec_pb2
  from model_search.search import common
  from model_search.search import search_algorithm
  import numpy
  import sklearn
  import sklearn.linear_model
label_desc: Use image node_id 3 for calling the LinearModel obj's underlying member method code with example usage: obj._suggest_by_padding(architectures, losses) and returns: loss,  trimmed