docstr: ```
  Performs grid search to find optimal set of hyperparameters
  Args:
    params (dict):  A dictionary defining the space of the search.
                    Example for finding optimal value of alpha in NBSVM:
                  parameters = {
                                #'clf__C': (1e0, 1e-1, 1e-2),
                                'clf__alpha': (0.1, 0.2, 0.4, 0.5, 0.75, 0.9, 1.0),
                                #'clf__fit_intercept': (True, False),
                                #'clf__beta' : (0.1, 0.25, 0.5, 0.9)
                                }
    n_jobs(int): number of jobs to run in parallel.  default:-1 (use all processors)
  ```
docstr_tok: ["``","`","Performs","grid","search","to","find","optimal","set","of","hyperparameters","Args",":","params","(","dict",")",":","A","dictionary","defining","the","space","of","the","search",".","Example","for","finding","optimal","value","of","alpha","in","NBSVM",":","parameters","=","{","#","'clf__C","'",":","(","1e0",",","1e-1",",","1e-2",")",",","'clf__alpha","'",":","(","0.1",",","0.2",",","0.4",",","0.5",",","0.75",",","0.9",",","1.0",")",",","#","'clf__fit_intercept","'",":","(","True",",","False",")",",","#","'clf__beta","'",":","(","0.1",",","0.25",",","0.5",",","0.9",")","}","n_jobs","(","int",")",":","number","of","jobs","to","run","in","parallel",".","default",":","-1","(","use","all","processors",")","``","`"]
code: def grid_search(self, params, x_train, y_train, n_jobs=-1):
      """
      ```
      Performs grid search to find optimal set of hyperparameters
      Args:
        params (dict):  A dictionary defining the space of the search.
                        Example for finding optimal value of alpha in NBSVM:
                      parameters = {
                                    #'clf__C': (1e0, 1e-1, 1e-2),
                                    'clf__alpha': (0.1, 0.2, 0.4, 0.5, 0.75, 0.9, 1.0),
                                    #'clf__fit_intercept': (True, False),
                                    #'clf__beta' : (0.1, 0.25, 0.5, 0.9)
                                    }
        n_jobs(int): number of jobs to run in parallel.  default:-1 (use all processors)
      ```
      """
      gs_clf = GridSearchCV(self.model, params, n_jobs=n_jobs)
      gs_clf = gs_clf.fit(x_train, y_train)
      # gs_clf.best_score_
      for param_name in sorted(params.keys()):
          print(
              "%s: %r" % (param_name, gs_clf.best_params_[param_name])
          )
      return
  
imports: from .None import utils
  from .imports import *
label_desc: Use image node_id 11 for calling the Classifier obj's underlying member method code with example usage: obj.grid_search(params, x_train, y_train, n_jobs) without return types