Weka is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from your own Java code. Weka contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization. It is also well-suited for developing new machine learning schemes.

To get the prediction for a given model, there are diverse possibilities:

  • With the Explorer: before starting the process, select the test set in test options by clicking on set. Then, open the classifier option dialog by clicking on ``More Options'' and set the option "Output text predictions on test set".In the end you will get the prediction model in the text buffer. Then Right click on the process( in the list under "Result list ( right-click for option") , and save the buffer.
  • With the command line: you can use: -pOnly outputs predictions for test instances, along with attributes (0 for none). For example:
    java weka.classifiers.j48.J48 -T data/trainingset.arff -c 1 -p 1

Source: Weka FAQ