title: GridSearch / make_scorer strange results with xgboost model
body: <p>I am tryting to use sklearn's gridsearch with a model created by xgboost. To do this, I am creating a custom scorer based on ndcg evaluation. I am successfully able to use Snippet 1 but it is too messy / hacky, I would prefer to use good old sklearn to simplify the code. I tried to implement GridSearch and the results is completely off: for the same X and y sets I get NDCG@k = 0.8 with Snippet 1 versus 0.5 with Snippet 2. Obviously there something I am not doing right here ...  </p>
  
  <p>The following pieces of code return very different results:</p>
  
  <p>Snippet1:</p>
  
  <pre><code>kf = StratifiedKFold(y, n_folds=5, shuffle=True, random_state=42)
  
  max_depth = [6]
  learning_rate = [0.22]
  n_estimators = [43]
  reg_alpha = [0.1]
  reg_lambda = [10]
  for md in max_depth:
      for lr in learning_rate:
          for ne in n_estimators:
              for ra in reg_alpha:
                  for rl in reg_lambda:
  
                      xgb = XGBClassifier(objective='multi:softprob', 
                                          max_depth=md, 
                                          learning_rate=lr, 
                                          n_estimators=ne,
                                          reg_alpha=ra, 
                                          reg_lambda=rl,
                                          subsample=0.6, colsample_bytree=0.6, seed=0)
                      print([md, lr, ne])
  
                      score = []
                      for train_index, test_index in kf:
                          X_train, X_test = X[train_index], X[test_index]
                          y_train, y_test = y[train_index], y[test_index]
  
                          xgb.fit(X_train, y_train)
                          y_pred = xgb.predict_proba(X_test)
  
                          score.append(ndcg_scorer(y_test, y_pred))
  
                      print('all scores: %s' % score)
                      print('average score: %s' % np.mean(score))
  </code></pre>
  
  <p>Snippet2:</p>
  
  <pre><code>from sklearn.grid_search import GridSearchCV
  
  params = {
      'max_depth':[6], 
      'learning_rate':[0.22], 
      'n_estimators':[43],
      'reg_alpha':[0.1], 
      'reg_lambda':[10],
      'subsample':[0.6], 
      'colsample_bytree':[0.6]
  }
  xgb = XGBClassifier(objective='multi:softprob',seed=0)
  scorer = make_scorer(ndcg_scorer, needs_proba=True)    
  gs = GridSearchCV(xgb, params, cv=5, scoring=scorer, verbose=10, refit=False)
  gs.fit(X,y)
  gs.best_score_
  </code></pre>
  
  <p>While snippet1 gives me the result as expected, the score returned by Snippet2 is not consistent with the ndcg_scorer.</p>