WEKA Crash after exceeding the avaiable Memory

In the lecture "Machine Learning" I have to process different kinds of datasets and perform several machine learning techniques on them. A few classifier like tree-based ones work very good on small datasets with less attributes but doesn't on big datasets with lots of attributes. In the worst case, WEKA crashes because it exceeds its reserved memory space.
2 answers

Change weka.ini file

Another possibility to allow WEKA to use more memory would be to change a line in the file weka.ini:
'maxheap=1024m' to 'maxheap=[...]m'. However, Windows might not let you do this. Then you can copy out the .ini file from its folder to another place (e.g. the Desktop), change it and move it back. This should work after an acknowledgement for Windows that the file can be overwritten.

Starting WEKA via CommandLine

It is possible to start WEKA via commandline and define additional parameter for the start.
For example starting WEKA via "java -jar -Xmx2048m weka.jar" would reserve 2GB memory and is usually enough for the most datasets!

Keep in mind, that this parameter depends on the avaiable memory in general!

Taggings: