2013-06-05 39 views
2

我跑以下命令:抛出:IllegalArgumentException在亨利马乌

//Training the classifier 
$ mahout trainnb -i train-vectors -el -li labelindex -o model -ow -c 

//Testing the classifer on the TRAINING set 
$ mahout testnb -i train-vectors -m model -l labelindex -ow -o tweets-testing -c 

//Testing the classifier with the TESTING SET 
$ mahout testnb -i test-vectors -m model -l labelindex -ow -o tweets-testing -c 

在运行最后一个命令,这是错误我得到

Exception in thread "main" java.lang.IllegalArgumentException: Label not found: 
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88) 
    at org.apache.mahout.classifier.ConfusionMatrix.getCount(ConfusionMatrix.java:102) 
    at org.apache.mahout.classifier.ConfusionMatrix.incrementCount(ConfusionMatrix.java:122) 
    at org.apache.mahout.classifier.ConfusionMatrix.incrementCount(ConfusionMatrix.java:126) 
    at org.apache.mahout.classifier.ConfusionMatrix.addInstance(ConfusionMatrix.java:94) 

我下面here.

我检查的例子labelindex文件与seqdumper和所有类/标签都存在。该文件也是HDFS格式。

我在这里做错了什么?

回答

1

好的,如果你的labelindex文件是正确的。 因为,错误没有指定缺少什么标签。 检查您的推特数据是否被标记。我的猜测是,一个或多个推文未被标记。

+0

you rock @ User2331441!你是我的英雄! – SLearner

+0

我如何检查推文未加标签? – eliasah

相关问题