Adding database drivers to use WEKA classes

后端 未结 1 1665
我在风中等你
我在风中等你 2020-12-19 18:25

I tried to run the following command on the command-line:

G:\\Weka-3-6>java weka.core.converters.CSVLoader data.csv > data.arff

This

相关标签:
1条回答
  • 2020-12-19 18:45

    Hi there are are a couple of points there The initial JDBC errors are because weka cannot find the database drivers.

    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?
    

    This isn't a major issue as you are loading from CSV but if you want to configure the database connectivity properly then look at http://weka.wikispaces.com/How+do+I+connect+to+a+database%3F

    The second issue

    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    

    is due to the CSV you are trying to load being to large for the default java heap. I don't know how large your data file is but i run weka with about 2gb on my machine with the -Xmx argument you could try.

    java -Xmx2200M java weka.core.converters.CSVLoader data.csv > data.arff
    

    where 2200M is the amount of memory you wish to allocate.

    0 讨论(0)
提交回复
热议问题