title: scikit-learn GridSearchCV with multiple repetitions
body: <p>I'm trying to get the best set of parameters for an SVR model.
  I'd like to use the <code>GridSearchCV</code> over different values of <code>C</code>.
  However, from previous test I noticed that the split into Training/Test set higlhy influence the overall performance (r2 in this instance).
  To address this problem, I'd like to implement a repeated 5-fold cross validation (10 x 5CV). Is there a built in way of performing it using <code>GridSearchCV</code>?</p>
  
  <p>QUICK SOLUTION:</p>
  
  <p>Following the idea presented in the sci-kit <a href="http://scikit-learn.org/stable/auto_examples/model_selection/plot_nested_cross_validation_iris.html" rel="noreferrer">offical documentation</a> , a quick solution is represented by:</p>
  
  <pre><code>NUM_TRIALS = 10
  scores = []
  for i in range(NUM_TRIALS):
       cv = KFold(n_splits=5, shuffle=True, random_state=i)
       clf = GridSearchCV(estimator=svr, param_grid=p_grid, cv=cv)
       scores.append(clf.best_score_)
  print "Average Score: {0} STD: {1}".format(numpy.mean(scores), numpy.std(scores))
  </code></pre>