Weka exception: source not specified

I try to use weka from the 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 

After that there is a detailed explanation of the use, but I do not think that I am using it incorrectly, since all websites talk about using WEKA in this way.

Can someone please help me about this?

Thanks.

+4
source share
1 answer

I myself figured out the reason.
Only on Linux.

The .arff file path must not have a leading "/".
So the correct way:

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

instead

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

Source: https://habr.com/ru/post/1501492/


All Articles