您可以通過在每個分類中可用的以下選項得到的預測,概率等,在命令行:
-classifications "weka.classifiers.evaluation.output.prediction.AbstractOutput + options"
Uses the specified class for generating the classification output.
E.g.: weka.classifiers.evaluation.output.prediction.PlainText
-p range
Outputs predictions for test instances (or the train instances if
no test instances provided and -no-cv is used), along with the
attributes in the specified range (and nothing else).
Use '-p 0' if no attributes are desired.
Deprecated: use "-classifications ..." instead.
-distribution
Outputs the distribution instead of only the prediction
in conjunction with the '-p' option (only nominal classes).
Deprecated: use "-classifications ..." instead.
例如,使用NaiveBayes在氣象數據集:
$ java weka.classifiers.bayes.NaiveBayes -t weather.nominal.arff -classifications weka.classifiers.evaluation.output.prediction.PlainText
=== Predictions under cross-validation ===
inst# actual predicted error prediction
1 2:no 1:yes + 0.926
2 1:yes 1:yes 0.825
1 2:no 1:yes + 0.636
2 1:yes 1:yes 0.808
1 2:no 2:no 0.718
2 1:yes 2:no + 0.656
1 2:no 1:yes + 0.579
2 1:yes 1:yes 0.541
1 2:no 1:yes + 0.515
1 1:yes 2:no + 0.632
1 1:yes 1:yes 0.84
1 1:yes 1:yes 0.554
1 1:yes 1:yes 0.757
1 1:yes 1:yes 0.778
輸出是製表符分隔的。