1

I am learning WEKA, I want to increase the heap size.

I did Q&A researches, most of the answers showed that heap size can be changed in RunWeka.ini, but I couldn't find RunWeka.ini and also maxheap.

My WEKA version is Weka 3.8.4 enter image description here

MWiesner
  • 8,868
  • 11
  • 36
  • 70
xuan
  • 11
  • 2

1 Answers1

0

Welcome to SO. You have two options.

Option 1:

  1. Open the notepad or text editor.

  2. Write the following statement inside.

    java -Xmx8000m -cp "weka.jar" weka.gui.GUIChooser
    

    Here "-Xmx" sets the maximum memory that Weka can use. Another version of this parameter is "-Xms". This parameter sets the minimum memory that Weka will use. "8000m" means 8000 MB. You can also write "4g" and specify in Gigabytes.

  3. Save the file in the notebook as shown in the picture below. For example "run.bat"

enter image description here

  1. Copy the file and paste it into the directory where Weka is located.

  2. I think it will be useful when you double-click the file you pasted.

Note: If you are using 32 bit java, you cannot increase more than 8GB. No problem on 64 bit.

Option 2:

  1. Enter the folder where Weka is located.

  2. Open the RunWeka.ini file. Find the line shown in the code below and enter the value you want as shown.

    javaOpts=%JAVA_OPTS% -Xmx8048m

  3. Save and run Weka.

I saw this option on the site (link here). But I don't know if it works. I think it works.

I am using the first option and it works. Good luck.

NCC1701
  • 139
  • 11