【发布时间】:2014-04-04 13:55:31
【问题描述】:
在 Mahout 中,我们如何手动为朴素贝叶斯分类器制作训练向量和测试向量,而不是使用 "--randomSelectionPct" 选项进行拆分。根据我的理解,我已经手动构建了训练向量和测试向量
bin/mahout seq2sparse -i TestSet0-seq -o TestSet0-vectors
bin/mahout seq2sparse -i TrainSet0-seq -o TrainSet0-vectors
/home/marvin1/hadoop-1.0.4/bin/hadoop fs -cp /user/marvin1/TestSet0-vectors/tfidf-vectors /user/marvin1/test-vectors
/home/marvin1/hadoop-1.0.4/bin/hadoop fs -cp /user/marvin1/TrainSet0-vectors/tfidf-vectors /user/marvin1/train-vectors
但是这个准确率只有 1%。这里的数据是 90-10 手动拆分。但是当我将完整的数据(训练+测试)传递给 mahout 并使用 "--randomSelectionPct 10" 时,它的准确率约为 50%。
请让我知道我在这方面做错了什么。
【问题讨论】:
标签: testing classification mahout