📜  sklearn 交叉验证分数 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:47.778000             🧑  作者: Mango

代码示例1
from sklearn.model_selection import cross_val_score
scores = cross_val_score(classifier_logreg, X_train, y_train, cv = 5, scoring='accuracy')
print('Cross-validation scores:{}'.format(scores))
print('Average cross-validation score: {}'.format(scores.mean()))