【发布时间】:2018-12-30 12:54:44
【问题描述】:
我第一次在 python 中使用 SVM。我还使用了 5 次交叉验证来检查模型的准确性。
模型的目标是对输出是否为缺陷进行分类。我想对照原始数据集交叉检查输出分类。换句话说,我想了解哪些产品被归类为缺陷,哪些产品未被归类为缺陷。我该怎么办?
我的代码:
from sklearn.svm import SVC
svclassifier_rbf = SVC(kernel='rbf')
clf = svclassifier_rbf.fit(X_train, y_train)
from sklearn.metrics import classification_report, confusion_matrix
print(confusion_matrix(y_test,y_pred_A_rbf))
print(classification_report(y_test,y_pred_A_rbf)
)
谢谢, 尼米什
【问题讨论】:
-
混淆矩阵和分类报告没有帮助你理解吗?还是您想知道预测为缺陷的实际数据点?