You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Albretch Mueller <lb...@gmail.com> on 2019/01/24 07:22:54 UTC
[math] java.lang.OutOfMemoryError: Java heap space:
DescriptiveStatistics.addValue() ...
I am "consistently" getting java.lang.OutOfMemoryError while trying
to use DescriptiveStatistics.
The files I am using are relatively large and I need to analyze the
byte distributions in them. I am taking care of clearing the cash each
time I run a new sample . . .
I can't quite get why this is happening, when all you need are at the
most 6 double variables which values you would incrementally update
based on well-known formulas.
Why would such OutOfMemoryError happen?
Is there a way around that problem?
lbrtchx
~
java.lang.OutOfMemoryError: Java heap space:
DescriptiveStatistics.addValue() ...
$ export JVM_ARGS="-Xms2048m -Xmx2048m"
$ time(java -classpath "${CLASSPATH}" -Dfile.encoding=utf8 "${_KD}") >
"${_LOG}" 2>&1
$ tail -n 11 "${_LOG}"
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at org.apache.commons.math3.util.ResizableDoubleArray.expand(ResizableDoubleArray.java:697)
at org.apache.commons.math3.util.ResizableDoubleArray.addElement(ResizableDoubleArray.java:442)
at org.apache.commons.math3.stat.descriptive.DescriptiveStatistics.addValue(DescriptiveStatistics.java:171)
at KByteInfo10DiffStats.setFfst(KByteInfo10DiffStats.java:80)
at IOBytAr08.readBytes(IOBytAr08Test.java:310)
at IOBytAr08Test.main(IOBytAr08Test.java:545)
real 4m44.987s
user 1m20.380s
sys 3m28.568s
$
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] java.lang.OutOfMemoryError: Java heap space:
DescriptiveStatistics.addValue() ...
Posted by Albretch Mueller <lb...@gmail.com>.
On 1/24/19, Gilles Sadowski <gi...@gmail.com> wrote:
> This caveat is mentioned in the documentation:
>
> http://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/stat/descriptive/DescriptiveStatistics.html
>
>> Is there a way around that problem?
>
> Yes; also mentioned in the above link.
http://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/stat/descriptive/SummaryStatistics.html
Actually (from a Mathematical point of view), why can't you get the
Skewness and Kurtosis of the data if very similar, incrementally
producing formulas based on the distribution moments could be used?
You can always write a wrapper object in the way I described above,
but I think my point is still valid.
lbrtchx
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] java.lang.OutOfMemoryError: Java heap space:
DescriptiveStatistics.addValue() ...
Posted by Gilles Sadowski <gi...@gmail.com>.
Hello.
Le jeu. 24 janv. 2019 à 08:23, Albretch Mueller <lb...@gmail.com> a écrit :
>
> I am "consistently" getting java.lang.OutOfMemoryError while trying
> to use DescriptiveStatistics.
>
> The files I am using are relatively large and I need to analyze the
> byte distributions in them. I am taking care of clearing the cash each
> time I run a new sample . . .
>
> I can't quite get why this is happening, when all you need are at the
> most 6 double variables which values you would incrementally update
> based on well-known formulas.
>
> Why would such OutOfMemoryError happen?
This caveat is mentioned in the documentation:
http://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/stat/descriptive/DescriptiveStatistics.html
> Is there a way around that problem?
Yes; also mentioned in the above link.
HTH,
Gilles
>
> lbrtchx
> ~
> java.lang.OutOfMemoryError: Java heap space:
> DescriptiveStatistics.addValue() ...
>
> $ export JVM_ARGS="-Xms2048m -Xmx2048m"
>
> $ time(java -classpath "${CLASSPATH}" -Dfile.encoding=utf8 "${_KD}") >
> "${_LOG}" 2>&1
>
> $ tail -n 11 "${_LOG}"
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> at org.apache.commons.math3.util.ResizableDoubleArray.expand(ResizableDoubleArray.java:697)
> at org.apache.commons.math3.util.ResizableDoubleArray.addElement(ResizableDoubleArray.java:442)
> at org.apache.commons.math3.stat.descriptive.DescriptiveStatistics.addValue(DescriptiveStatistics.java:171)
> at KByteInfo10DiffStats.setFfst(KByteInfo10DiffStats.java:80)
> at IOBytAr08.readBytes(IOBytAr08Test.java:310)
> at IOBytAr08Test.main(IOBytAr08Test.java:545)
>
> real 4m44.987s
> user 1m20.380s
> sys 3m28.568s
> $
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [math] java.lang.OutOfMemoryError: Java heap space:
DescriptiveStatistics.addValue() ...
Posted by Albretch Mueller <lb...@gmail.com>.
On 1/24/19, Albretch Mueller <lb...@gmail.com> wrote:
> I am "consistently" getting java.lang.OutOfMemoryError while trying
> to use DescriptiveStatistics.
Actually, this is what I needed:
import org.apache.commons.math3.stat.descriptive.moment.Mean;
import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation;
import org.apache.commons.math3.stat.descriptive.moment.Skewness;
import org.apache.commons.math3.stat.descriptive.moment.Kurtosis;
~
in case someone runs into the same problem.
lbrtchx
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org