sklearn.metrics —— 混淆矩阵及其绘制、Accuracy/Precision/Recall/F1-score
1.confusion_matrixsklearn关于confusion_matrix混淆矩阵接口的定义十分清楚:sklearn.metrics.confusion_matrix(y_true,y_pred,labels=None,sample_weight=None)>>>fromsklearn.metricsimportconfusion_matrix>>>y_true=[2,0,2,2,0,