Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weka GUI - Not enough memory, won't load?

This same installation of Weka has loaded for me in the past. I am simply trying to load the Weka GUI (double click on the icon) and I get the following error. How can I fix it?

OutOfMemory
Not enough memory.  Please load a smaller dataset or use a larger heap size.
- initial JVM size: 122.4 MB
- total memory used: 165.3 MB
- max. memory avail.: 227.6 MB

Note:
The Java heap size can be specified with the -Xmx option.
etc..

I am not loading Weka from the command line, so how can I stop this from occurring?

like image 385
Jim Avatar asked Feb 06 '12 17:02

Jim


2 Answers

Just write an answer here for ubuntu users.

If you apt-get install weka, you will have a script installed at /usr/bin/weka The first a few lines look like below:

#!/bin/bash

. /usr/lib/java-wrappers/java-wrappers.sh

# default options
CLASS="weka.gui.GUIChooser"
MEMORY="256m"
GUI=""

Just modify the line starts with MEMORY so that you have larger upper bound.

MEMORY="2048m"
like image 177
dvail Avatar answered Oct 20 '22 00:10

dvail


I'm not sure why you were able to use it before but not now. However, you can specify a larger heap size by changing the RunWeka.ini configuration file. On a Windows machine it should be in the Weka folder of your Program Files directory. You could try a line specifying, for example,

maxheap=200m

There might already be such an option in that file that you can simply change to a larger number.

like image 22
Michael McGowan Avatar answered Oct 19 '22 23:10

Michael McGowan