小编Bid*_*Das的帖子

如何获取sklearn.metrics.classification_report的输出作为dict?

我一直试图以字典的形式获得分类报告。因此,根据scikit-learn 0.20文档,我这样做:

from sklearn import metrics

rep = metrics.classification_report(y_true, y_pred, output_dict=True)
Run Code Online (Sandbox Code Playgroud)

但出现错误提示

TypeError: classification_report() got an unexpected keyword argument 'output_dict'
The scikit-learn module in my machine was initially 0.19.1 but even after updating it to 0.20, the same error message shows.
Run Code Online (Sandbox Code Playgroud)

python svm python-3.x scikit-learn

5
推荐指数
1
解决办法
2426
查看次数

标签 统计

python ×1

python-3.x ×1

scikit-learn ×1

svm ×1