【发布时间】:2016-04-07 07:32:45
【问题描述】:
我正在使用 SciKit 作为一个库来处理分类算法,例如:NB、SVM。
这是一个非常好的binary classification implementation 用于“SPAM 和 HAM”电子邮件:
confusion += confusion_matrix(test_y, predictions)
score = f1_score(test_y, predictions, pos_label=SPAM)
//note in my case 3-classes I do not need to set [pos_label]
如果我有像 {SPAM, HAM, NORMAL} 这样的三个类而不是两个类,那么:我如何调整该代码以找到每个类以及所有类的 F1-Score 作为 平均。
【问题讨论】:
标签: machine-learning nltk computer-science text-classification