Export weka results on command line

主宰稳场 提交于 2019-12-23 22:32:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!