title: sklearn logistic regression parameter in GridSearch
body: <p>just wondering how to separate parameters into a group and pass it to gridsearch?
  As i want to pass penalty l1 and l2 to grid search and corresponding solver newton-cg to L2.</p>
  
  <p>However, when i run the code below, the gridsearch will first run l1 with newton-cg and result in error msg 
  ValueError: Solver newton-cg supports only l2 penalties, got l1 penalty.</p>
  
  <p>Thanks</p>
  
  <pre><code> param_grid = [
  
    {'penalty':['l1','l2'] ,
     'solver' : ['newton-cg', 'lbfgs', 'liblinear', 'sag', 'saga']
    }
  
   ]
  </code></pre>