OutOfMemoryException when using WEKA 3-6 under Windows 7

Weka is a collection of machine learning algorithms for data mining tasks. This software can be used by students who participate in the class "Machine Learning" at TU Wien. When the Weka-User executes memory-intesitive tasks (e.g. visualizes results of a machine learning algorithm), Weka is very likely to throw an OutOfMemoryException. As a result to the exception the software crashes. This execption is absolutely repeatable. The Weka-User will get the exception at every time he executes the sequence of operations which had previously lead to the exeception. That is why there is no way to workaround this error without having to disclaim using Weka. The OutOfMemoryException is not only limited to Weka 3-6 on Windows 7.
1 answer

OutOfMemoryException when using WEKA 3-6 under Windows 7

Firstly the Weka-User has to extend the memory available for the Java virtual machine by setting appropriate options. With Sun's JDK the Weka-User can set the parameter "-Xmx1024m" to set the maximum Java heap size to 1024MB.
Under Windows 7 The Weka-User can set this parameter under Control Panel -> Java -> Java -> View -> Runtime Parameters.

Secondly the Weka-User has to change the "maxheap" parameter in the RunWeka.ini File. This file is contained in the root directory of your Weka installation. By setting "maxheap=1024m" the maximum heap size is set to 1024MB.