在预测模型中的任何值时,是否有任何命令调用错误分类的值,简而言之就是那些分类不正确的值。
答案 0 :(得分:0)
scikit-learn API中没有此类方法。不过,您可以自己编写几行:
import numpy as np
X_train, X_test, y_train, y_test = ... # some dataset
model = ... # some scikit learn model
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
# command to get misclassified examples assuming you have numpy arrays
X_test[np.argwhere(y_pred != y_test)]