我是新手..!我需要将一个csv文件加载到weka,所以我使用这个终端命令
java -cp /usr/share/java/weka.jar weka.core.converters.CSVLoader newfile.csv > miller.arff
我发现了一些像这样的错误...
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)
可能是什么问题?
答案 0 :(得分:1)
检查newfile.csv中的40140行。最有可能的是它只包含7个值。