我使用的是mahout 0.8,在使用naivebayes进行分类之后,我得到的结果是:
FileName Category Score
1000221 male -13059.636009313888
1000378369 female -6660.011396382251
10004522 male -20388.73959786186
怎么读这个分数?我想得到每个文件名的准确性。在代码中,我有:
// some code...
vector.setQuick(wordId, tfValue);
// some code...
Vector resultVector = classifier.classifyFull(vector);
double bestScore = -Double.MAX_VALUE;
for(Element element: resultVector.all()) {
int categoryId = element.index();
double score = element.get();
if (score > bestScore) {
bestScore = score;
bestCategoryId = categoryId;
}
}
return bestScore;
暂无答案!
目前还没有任何答案,快来回答吧!