title: Set multiple parameters from GridSearch at once
body: <p>After using GridSearchCV on my dataset, I want to extract all the best parameters.</p>
  
  <pre><code>from sklearn.tree import DecisionTreeClassifier
  
  params_grid = {'max_depth': np.arange(3, 10),
                'max_leaf_nodes':list(xrange(20,100,20)),
                'max_features':list(xrange(2,10,2))
                 }
  my_dt = DecisionTreeClassifier()
  grid_clf = GridSearchCV(my_dt, params_grid)
  grid_clf.fit(xtrain, ytrain)
  
  best_plist = grid_clf.best_params_
  </code></pre>
  
  <p>Now I want to create a new a <code>DecisionTreeClassifier</code> object and set it's paramters the same as the <code>best_plist</code>. The problem is that I am doing it manually for each parameter like this :</p>
  
  <pre><code>new_clf = DecisionTreeClassifier()
  new_clf.max_depth=bestplit['max_depth']  # and so on for all the parameters
  </code></pre>
  
  <p>However, I will be analyzing multiple ML algoritihms and would want a generic way of setting the parameters of the new object instead of hard-coding for every algorithm. I just wanted to know is there any work around for this in sklearn for this ?</p>