在使用 scikit-learn 测试多类 svm 时,如何找到预测的置信度?

how can you find the confidence level of the prediction in testing multiclass svm using scikit-learn?

我的代码:

clf=svm.NuSVC(probability=True) clf.fit(X,Y) print clf.predict_proba(test_image)

我怎么知道哪个概率是预测的 class。它给了我一个数组?

这里的predict_prob方法returns一个形状数组(n_samples, n_classes)。这些列对应于排序顺序中的 类,因为它们出现在属性 类_.