title: confusion matrix and classification report of StratifiedKFold
body: <p>I am using StratifiedKFold to checking the performance of my classifier. I have two classes and I trying to build Logistic Regression classier. 
  Here is my code</p>
  
  <pre><code>skf = StratifiedKFold(n_splits=10, shuffle=True, random_state=0)
  for train_index, test_index in skf.split(x, y):
      x_train, x_test = x[train_index], x[test_index]
      y_train, y_test = y[train_index], y[test_index]
  
      tfidf = TfidfVectorizer()
      x_train = tfidf.fit_transform(x_train)
      x_test = tfidf.transform(x_test)
  
      clf =  LogisticRegression(class_weight='balanced')
      clf.fit(x_train, y_train)
      y_pred = clf.predict(x_test)
      score = accuracy_score(y_test, y_pred)
      r.append(score)
      print(score)
  
  print(np.mean(r))
  </code></pre>
  
  <p>I could just print the score of the performance but I couldn't figure out how to print the confusion matrix and classification report.If I just add print statement inside the loop, </p>
  
  <pre><code>print(confusion_matrix(y_test, y_pred))
  </code></pre>
  
  <p>it will print it 10 times, but I want to report and a matrix of the final performance of the classifier. </p>
  
  <p>Any help about how to calculation the matrix and the report. Thanks</p>