You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Thomas Anderson <t....@gmail.com> on 2011/03/15 09:36:53 UTC
maximum number of iterations reached
When using NormalDistributionImpl calss, I encounter the error throwing message
org.apache.commons.math.ConvergenceException: maximum number of
iterations reached
at org.apache.commons.math.special.Gamma.regularizedGammaP(Gamma.java:176)
at org.apache.commons.math.special.Erf.erf(Erf.java:52)
at org.apache.commons.math.distribution.NormalDistributionImpl.cumulativeProbability(NormalDistributionImpl.java:105)
at mypackage.Myclass.add(Myclass.java:109)
at mypackage.Myclass.$Msger.call(Myclass.java:69)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
The value provided in cumulativeProbability is a double of current
time subtracting previous timestamped e.g. t_now - t_prev
What might cause this issue or how to fix it?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
[Math] Re: maximum number of iterations reached
Posted by Gilles Sadowski <gi...@harfang.homelinux.org>.
On Tue, Mar 15, 2011 at 11:38:55AM +0100, Gilles Sadowski wrote:
> Hi.
>
> [Please add a "[Math]" marker in the subject line of posts about the Commons
> Math project; this will raise the likelihood that the right people will
> notice your message.]
Oops, I forgot to do it :-}.
> On Tue, Mar 15, 2011 at 04:36:53PM +0800, Thomas Anderson wrote:
> > When using NormalDistributionImpl calss, I encounter the error throwing message
> >
> > org.apache.commons.math.ConvergenceException: maximum number of
> > iterations reached
> > at org.apache.commons.math.special.Gamma.regularizedGammaP(Gamma.java:176)
> > at org.apache.commons.math.special.Erf.erf(Erf.java:52)
> > at org.apache.commons.math.distribution.NormalDistributionImpl.cumulativeProbability(NormalDistributionImpl.java:105)
> > at mypackage.Myclass.add(Myclass.java:109)
> > at mypackage.Myclass.$Msger.call(Myclass.java:69)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> > at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
> > at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
> > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> >
> > The value provided in cumulativeProbability is a double of current
> > time subtracting previous timestamped e.g. t_now - t_prev
> >
> > What might cause this issue or how to fix it?
> >
>
> I don't know, but a good staring point would be to provide a fully working
> unit test that demonstrates the problem, and attach it to a new issue in the
> project's bug tracking page:
> https://issues.apache.org/jira
>
>
> Thanks and best regards,
> Gilles
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: maximum number of iterations reached
Posted by Gilles Sadowski <gi...@harfang.homelinux.org>.
Hi.
[Please add a "[Math]" marker in the subject line of posts about the Commons
Math project; this will raise the likelihood that the right people will
notice your message.]
On Tue, Mar 15, 2011 at 04:36:53PM +0800, Thomas Anderson wrote:
> When using NormalDistributionImpl calss, I encounter the error throwing message
>
> org.apache.commons.math.ConvergenceException: maximum number of
> iterations reached
> at org.apache.commons.math.special.Gamma.regularizedGammaP(Gamma.java:176)
> at org.apache.commons.math.special.Erf.erf(Erf.java:52)
> at org.apache.commons.math.distribution.NormalDistributionImpl.cumulativeProbability(NormalDistributionImpl.java:105)
> at mypackage.Myclass.add(Myclass.java:109)
> at mypackage.Myclass.$Msger.call(Myclass.java:69)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>
> The value provided in cumulativeProbability is a double of current
> time subtracting previous timestamped e.g. t_now - t_prev
>
> What might cause this issue or how to fix it?
>
I don't know, but a good staring point would be to provide a fully working
unit test that demonstrates the problem, and attach it to a new issue in the
project's bug tracking page:
https://issues.apache.org/jira
Thanks and best regards,
Gilles
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
[math] Re: maximum number of iterations reached
Posted by Phil Steitz <ph...@gmail.com>.
On 3/15/11 1:36 AM, Thomas Anderson wrote:
> When using NormalDistributionImpl calss, I encounter the error throwing message
>
> org.apache.commons.math.ConvergenceException: maximum number of
> iterations reached
> at org.apache.commons.math.special.Gamma.regularizedGammaP(Gamma.java:176)
> at org.apache.commons.math.special.Erf.erf(Erf.java:52)
> at org.apache.commons.math.distribution.NormalDistributionImpl.cumulativeProbability(NormalDistributionImpl.java:105)
> at mypackage.Myclass.add(Myclass.java:109)
> at mypackage.Myclass.$Msger.call(Myclass.java:69)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>
> The value provided in cumulativeProbability is a double of current
> time subtracting previous timestamped e.g. t_now - t_prev
>
> What might cause this issue or how to fix it?
What version of Commons Math are you running? From the line numbers
in the stack trace, it looks like you may be using 1.1, which is
ancient and had a bug that led to this error when cumulative
probabilities were evaluated for extreme values. If possible, you
should upgrade to the latest version of Commons Math, which is
version 2.2. If that is not possible, as a workaround, most likely
what is going on is you are asking for a cumulative probability that
is not distinguishable from either 0 or 1. Check to make sure that
the actual parameter to the cumulative probability function is not
less than 40 standard deviations below the mean (in which case the
cum prob should be 0) or greater than 40 std devs above the mean (in
which case it should be 1).
Phil
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org