title: How to perform standardization on the data in GridSearchCV?
body: <p>How to perform standardizing on the data in GridSearchCV?</p>
  
  <p>Here is the code. I have no idea on how to do it.</p>
  
  <pre><code>import dataset
  import warnings
  warnings.filterwarnings("ignore")
  
  import pandas as pd
  dataset = pd.read_excel('../dataset/dataset_experiment1.xlsx')
  X = dataset.iloc[:,1:-1].values
  y = dataset.iloc[:,66].values
  
  from sklearn.model_selection import GridSearchCV
  #from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
  stdizer = StandardScaler()
  
  print('===Grid Search===')
  
  print('logistic regression')
  model = LogisticRegression()
  parameter_grid = {'solver': ['newton-cg', 'lbfgs', 'liblinear', 'sag', 'saga']}
  grid_search = GridSearchCV(model, param_grid=parameter_grid, cv=kfold, scoring = scoring3)
  grid_search.fit(X, y)
  print('Best score: {}'.format(grid_search.best_score_))
  print('Best parameters: {}'.format(grid_search.best_params_))
  print('\n')
  </code></pre>
  
  <p><strong>Update</strong> 
  This is what I try to run but get the error:</p>
  
  <pre><code>print('logistic regression')
  model = LogisticRegression()
  pipeline = Pipeline([('scale', StandardScaler()), ('clf', model)])
  parameter_grid = {'solver': ['newton-cg', 'lbfgs', 'liblinear', 'sag', 'saga']}
  grid_search = GridSearchCV(pipeline, param_grid=parameter_grid, cv=kfold, scoring = scoring3)
  grid_search.fit(X, y)
  print('Best score: {}'.format(grid_search.best_score_))
  print('Best parameters: {}'.format(grid_search.best_params_))
  print('\n')
  </code></pre>