confusion matrix and classification report of StratifiedKFold
问题 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 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