我正在尝试在不弹出 GUI 的情况下从命令行运行 Weka ML 包。我试过:
java -jar "\C:\Program Files\Weka-3-6\weka.jar"
这使得小程序初始化,仅此而已。所以我附加了针对我的问题的参数:
java -jar "\C:\Program Files\Weka-3-6\weka.jar"
weka.classifiers.functions.MultilayerPerceptron
-t data.arff -T test.arff 2> y.txt
全部在一条线上,但为了清楚起见而分开。这确实会产生一些输出,y.txt
因为我稍后需要阅读它,但它给出了:
---Registering Weka Editors---
Trying to add database driver (JDBC): RmiJdbc.RJDriver - Error, not in CLASSPATH?
Trying to add database driver (JDBC): jdbc.idbDriver - Error, not in CLASSPATH?
Trying to add database driver (JDBC): org.gjt.mm.mysql.Driver - Error, not in CLASSPATH?
Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Error, not in CLASSPATH?
Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Error, not in CLASSPATH?
我不关心上述内容,因为JDBC
与数据库相关,我不处理。但在那之后:
java.lang.NullPointerException
weka.gui.GUIChooser.showExplorer(GUIChooser.java:1099)
weka.gui.GUIChooser.main(GUIChooser.java:1371)
at weka.gui.GUIChooser.showExplorer(GUIChooser.java:1099)
at weka.gui.GUIChooser.main(GUIChooser.java:1371)
而且我不确定如何继续。有没有人有任何weka经验?