commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <Luc.Maison...@free.fr>
Subject Re: [math] LevenbergMarquardtEstimator - maximal number of evaluations exceeded
Date Mon, 28 Jan 2008 18:23:13 GMT
Mickey wrote:
> When using the LevenbergMarquardtEstimator to solve for a quardratic 
> equation. I get the exception below. Can anyone explain to me what is 
> happening? This code works for most data that I have, but not in this 
> particular case. This code is set into motion by clicking a button.
> 
> The code that throw the exception is:
> 
> throw new EstimationException("maximal number of evaluations exceeded 
> ({0})",
>                             new String[] {
>                             Integer.toString(maxCostEval)
>                        });
> 
> In this case maxCostEval is 1000. I tried setting it to 10,000, but I 
> still get the same error. I'm confused first of all in that the String 
> above doesn't appear in the exception and second in what the 
> NoSuchMethodError is supposed to indicate.
> 
> exception: 
> ------------------------------------------------------------------------------ 
> 
> Jan 28, 2008 7:45:52 AM STDERR: Exception in thread "AWT-EventQueue-0"
> Jan 28, 2008 7:45:52 AM STDERR: java.lang.NoSuchMethodError: 
> org.apache.commons.math.MathException.<init>(Ljava/lang/String;[Ljava/lang/Object;)V

> 
> Jan 28, 2008 7:45:52 AM STDERR:     at 
> org.apache.commons.math.estimation.EstimationException.<init>(EstimationException.java:42)

> 
> Jan 28, 2008 7:45:52 AM STDERR:     at 
> org.apache.commons.math.estimation.LevenbergMarquardtEstimator.estimate(LevenbergMarquardtEstimator.java:511)


This shows an error in [math], thanks for reporting it. I have fixed 
this as of r615975 a few minutes ago. You seem to have a version more 
than a few days old (this code has changed recently), so either you 
check out the all source again or you port the fix into your version. 
For this, you should change in the exception construction:
          new String[] {
            Integer.toString(maxCostEval)
          });
into:
          new Object[] { new Integer(maxCostEval) });



However, the fact the exception is thrown shows there is a convergence 
problem. Could you check the thresholds ?


Luc

> (... and more ...)
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message