4

I am trying to use weka from ubuntu command line, however, when I execute the following command:

java -cp ./weka.jar weka.classifiers.trees.J48 -t /data/iris.ARFF

Then, I get

Weka exception: No source has been specified    

Following it, there are a detail explanation of the usage, but I do not think I use it wrongly, since all the websites are talking about using WEKA in that way.

Could someone please help me about this?

Thanks ahead.

4

1 回答 1

5

我自己找到了原因。
仅在 Linux 上。

.arff 文件的路径中不应有前导“/”。
所以正确的方法应该是:

java -cp ./weka.jar weka.classifiers.trees.J48 -t data/iris.ARFF 

代替

java -cp ./weka.jar weka.classifiers.trees.J48 -t /data/iris.ARFF
于 2013-09-21T17:26:54.583 回答