2015-07-10 101 views
0

我是新手..!我需要加載一個CSV文件WEKA所以我用這個終端指令需要將CVS文件轉換爲arff文件的解決方案

java -cp /usr/share/java/weka.jar weka.core.converters.CSVLoader newfile.csv > miller.arff

和我recive一些象這樣的錯誤......

Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar ---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? java.io.IOException: wrong number of values. Read 8, expected 7, read Token[EOL], line 40140 at weka.core.converters.ConverterUtils.errms(ConverterUtils.java:912) at weka.core.converters.CSVLoader.getInstance(CSVLoader.java:824) at weka.core.converters.CSVLoader.getDataSet(CSVLoader.java:646) at weka.core.converters.AbstractFileLoader.runFileLoader(AbstractFileLoader.java:323) at weka.core.converters.CSVLoader.main(CSVLoader.java:1041)

可能是什麼問題呢? ?

回答

1

在newfile.csv中檢查第40140行。它最有可能只包含7個值。

+0

有點它的工作......但有一些缺失的值。不管怎樣,謝謝..:) – Miller

相關問題