docstr: Compare optimizer's objective function performance scores
  for all combinations of provided parameters
  
  Parameters
  ----------
  
  maximum: bool
      a bool defaulting to False, returning the minimum value for the
      objective function. If set to True, will return the maximum value
      for the objective function.
docstr_tok: ["Compare","optimizer","'s","objective","function","performance","scores","for","all","combinations","of","provided","parameters","Parameters","--","--","--","--","--","maximum",":","bool","a","bool","defaulting","to","False",",","returning","the","minimum","value","for","the","objective","function",".","If","set","to","True",",","will","return","the","maximum","value","for","the","objective","function","."]
code: def search(self, maximum=False):
      """Compare optimizer's objective function performance scores
      for all combinations of provided parameters
  
      Parameters
      ----------
  
      maximum: bool
          a bool defaulting to False, returning the minimum value for the
          objective function. If set to True, will return the maximum value
          for the objective function.
      """
  
      # Generate the grid of all hyperparameter value combinations
      grid = self.generate_grid()
  
      # Calculate scores for all hyperparameter combinations
      scores = [self.generate_score(i) for i in grid]
  
      # Default behavior
      idx, self.best_score = min(
          enumerate(scores), key=op.itemgetter(1)
      )
  
      # Catches the maximum bool flag
      if maximum:
          idx, self.best_score = max(
              enumerate(scores), key=op.itemgetter(1)
          )
  
      # Return optimum hyperparameter value property from grid using index
      self.best_options = op.itemgetter(idx)(grid)
      return self.best_score, self.best_options
  
file_path: pyswarms/pyswarms/utils/search/base_search.py
imports: from __future__ import absolute_import, print_function, with_statement
  import operator
label_desc: Use image node_id 4 for calling the SearchBase obj's underlying member method code with example usage: obj.search(maximum) and returns: self,  self