问题
Is it possible to export weka results after execute it via command line?
What I am doing:
java -cp "./weka.jar" weka.classifiers.bayes.NaiveBayes -t "iris.arff" -i
But then, I have all the statistics in console, is there any way to export this? Or I have to read and write by myself?
Thanks!
回答1:
An example from the Weka Primer:
java -Xmx1024m weka.classifiers.trees.J48 -t data.arff -i -k -d J48-data.model >&! J48-data.out &
So no, WEKA doesn't have a specific output parameter on the command line, but you simply redirect the output and errors to a file using >&!
or only the output without errors using >
.
In your case you could use this command to save the output to the file NaiveBayes-iris.out
:
java -cp "./weka.jar" weka.classifiers.bayes.NaiveBayes -t "iris.arff" -i > NaiveBayes-iris.out
来源:https://stackoverflow.com/questions/16968966/export-weka-results-on-command-line