title: Learning Weka on the Command Line
body: <p>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.</p>
  
  <p>How can I do this?</p>
  
  <p>I have this code as a starting block</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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).</p>
  
  <p>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).  </p>
  
  <p>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.</p>