Why does LibSVMLoader produce an OutOfMemoryError in Weka?

131 Views Asked by At

I am trying to load a dataset in LibSVM Format with weka. Here the code:

LibSVMLoader svmLoader = new LibSVMLoader();
svmLoader.setSource(new File("data_with_libsvm_format"));
Instances svmData = svmLoader.getDataSet();
System.out.println(svmData.toSummaryString());

And I get the exception:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

I set -Xmx4000m and notice that the program rapidly consumes 4000m of RAM and throws exception. Does Weka really handle libsvm format or load and store the data in dense format internally during the process?

0

There are 0 best solutions below