Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Machine Learning by (19k points)

I am fairly new to Weka and even more new to Weka on the command line. I find documentation is poor and I am struggling to figure out a few things to do. For example, want to take two .arff files, one for training, one for testing and get an output of predictions for the missing labels in the test data.

How can I do this?

I have this code as a starting block

java -classpath weka.jar weka.classifiers.meta.FilteredClassifier

-t "training_file_with_missing_values.arff"

-T "test_file_with_missing_values.arff"

-F weka.filters.unsupervised.attribute.ReplaceMissingValues -- -c last

-W weka.classifiers.functions.MultilayerPerceptron -- -L 0.3 -M 0.2 -H a

Running that code gives me "Illegal option -c last" and I am not sure why. I am also not going to be using MLP as NN tend to be too slow when I have a few thousand features from the text data. I know how to change it to another classifier though (like NB or libSVM so that is good).

But I am not sure how to add multiple filters in one call as I also need to add the StringToWordVector filter (and possibly the Reorder filter to make the class the last, instead of first attribute).

And then how do I get it actually output me the prediction labels of each class? And then store so those in an arff with the initial data.

1 Answer

0 votes
by (33.1k points)

Weka is not actually the shining example of documentation, but you can still find valuable information about it on their sites. You should start with the Primer. I understand that you want to classify text files, so you should also have a look at Text categorization with WEKA. There is also a new Weka documentation site.

Hope this answer helps you! To know more about Weka, undergo a Machine Learning Certification.

Browse Categories

...