Weka加载大数据量内存不足时不同平台的解决方法
ubuntu的解决方法
你只要在启动weka的时候,加上如下命令即可:
java -Xmx400M -jar weka.jar
From--
I hit the JAVA OutOfMemory exception when I'm dealing with a largedataset. It seems that JAVA uses a default limit of 64Mb for itsmemory usage. To increase the limit, you can try the JAVA -Xmx option, e.g. java -Xmx400M -jar weka.jarThis increases the limit to 400 Mb (my system has 512Mb). You shouldset your limit depending on the amount of memory you have available.See this link for more
如果你和我一样设置了脚本,就将weka脚本修改为
#! /bin/bash
java -Xmx400M -classpath $CLASSPATH:weka.jar:libsvm.jar weka.gui.GUIChooser
这样,就是400m了
windows方法
用文本编辑器打开RunWeka.ini找到:
# placeholders ("#bla#" in command gets replaced with content of key "bla")
# Note: "#wekajar#" gets replaced by the launcher class, since that jar gets
# provided as parameter
maxheap=1444m