增加堆以避免WEKA中的内存不足错误 [英] Increase heap to avoid Out of Memory Error in WEKA
本文介绍了增加堆以避免WEKA中的内存不足错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试通过以下命令行使用J48分类器在WEKA中运行分类器:
$ java -Xmx2048m -cp /home/weka-3-7-9/weka.jar weka.classifiers.trees.J48 -t input.arff -i -k -d J48-data.model &
尽管我的船长是43.8 M,我将堆空间增加到了2048m, 我仍然收到以下错误:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.<init>(ArrayList.java:132)
at weka.core.Instances.initialize(Instances.java:196)
at weka.core.Instances.<init>(Instances.java:177)
at weka.classifiers.trees.j48.ClassifierSplitModel.split(ClassifierSplitModel.java:252)
at weka.classifiers.trees.j48.ClassifierTree.buildTree(ClassifierTree.java:159)
at weka.classifiers.trees.j48.C45PruneableClassifierTree.buildClassifier(C45PruneableClassifierTree.java:126)
at weka.classifiers.trees.J48.buildClassifier(J48.java:249)
at weka.classifiers.evaluation.Evaluation.evaluateModel(Evaluation.java:1485)
at weka.classifiers.Evaluation.evaluateModel(Evaluation.java:649)
at weka.classifiers.AbstractClassifier.runClassifier(AbstractClassifier.java:297)
at weka.classifiers.trees.J48.main(J48.java:1062)
有人知道我做错了什么吗?还是可以为我指出增加堆的其他解决方案?
谢谢.
解决方案
Ubuntu用户的快速说明:可以通过使用喜欢的编辑器更改文件/usr/bin/weka
中的行MEMORY="256m"
来设置堆.>
I am trying to run a classifier in WEKA, using a J48 classifier using the following command line:
$ java -Xmx2048m -cp /home/weka-3-7-9/weka.jar weka.classifiers.trees.J48 -t input.arff -i -k -d J48-data.model &
Although the size of my arff is 43.8 M, and I aumented the heap space to 2048m, I still received the following errors:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.<init>(ArrayList.java:132)
at weka.core.Instances.initialize(Instances.java:196)
at weka.core.Instances.<init>(Instances.java:177)
at weka.classifiers.trees.j48.ClassifierSplitModel.split(ClassifierSplitModel.java:252)
at weka.classifiers.trees.j48.ClassifierTree.buildTree(ClassifierTree.java:159)
at weka.classifiers.trees.j48.C45PruneableClassifierTree.buildClassifier(C45PruneableClassifierTree.java:126)
at weka.classifiers.trees.J48.buildClassifier(J48.java:249)
at weka.classifiers.evaluation.Evaluation.evaluateModel(Evaluation.java:1485)
at weka.classifiers.Evaluation.evaluateModel(Evaluation.java:649)
at weka.classifiers.AbstractClassifier.runClassifier(AbstractClassifier.java:297)
at weka.classifiers.trees.J48.main(J48.java:1062)
Does someone know if I am doing something incorrectly? Or can point me to a different solution to increase the heap?
Thank you in advance.
解决方案
Quick instruction for the Ubuntu-Users: The heap can be set by changing the line MEMORY="256m"
in the file /usr/bin/weka
with your favored editor.
这篇关于增加堆以避免WEKA中的内存不足错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文