Re: powell_f exceeding maximum iterations [message #52310] |
Sat, 27 January 2007 11:14 |
Brian Larsen
Messages: 270 Registered: June 2006
|
Senior Member |
|
|
I have had similar issues many many times, what does the function you
are trying to minimize look like? A little investigation with contour
often helps a lot, which of course is a huge pain.
The issue is almost always a function not suited to the style on
minimization you are using. Reading through Numerical Recipes (http://
www.nrbook.com/b/bookcpdf.php) in the section about Powell's method
would be time well spent. One paragraph in particular in section 10.5
reads
"This simple method is actually not too bad for many functions. Even
more
interesting is why it is bad, i.e. very inefficient, for some other
functions. Consider
a function of two dimensions whose contour map (level lines) happens
to define a
long, narrow valley at some angle to the coordinate basis vectors (see
Figure 10.5.1).
Then the only way "down the length of the valley" going along the
basis vectors at
each stage is by a series of many tiny steps. More generally, in N
dimensions, if
the function's second derivatives are much larger in magnitude in some
directions
than in others, then many cycles through all N basis vectors will be
required in
order to get anywhere. This condition is not all that unusual;
according to Murphy's
Law, you should count on it."
And Murphy has struck you. Try AMOEBA, DFPMIN, and maybe SIMPLEX and
see if they work for this function. Or even better would be to
understand the nature of your function and choose smartly, but who has
time for that, I normally don't either.
Cheers,
Brian
------------------------------------------------------------ -----------
Brian A. Larsen
Dept. of Physics
Space Science and Engineering Lab (SSEL)
Montana State University - Bozeman
Bozeman, MT 59717
On Jan 27, 11:32 am, "aetherlux" <aether...@gmail.com> wrote:
> Hi everybody, I have a problem with the built in Powell function.
> Systems: Debian GNU/Linux 3.1 and Ubuntu 6.06
>
> I have several linked pro files. One of them uses the Powell function.
> When running the main program I obtain this error:
> ################################################
> .....; several previous outputs, all is right
> % Compiled module: REGRESS.
> WARNING: 2.24138 percent of points deleted...
> Removed 11989 bad pts.
> % Compiled module: IDENTITY.; all things are right until this line
> % Program caused arithmetic error: Floating illegal operand
>
> ....; if I use the argument ITMAX=1 in powell then I obtain 114
> Floating illegal operand errors.
>
> % Program caused arithmetic error: Floating illegal operand
> % POWELL: powell_f exceeding maximum iterations.
> % Execution halted at: COREST 136
> /path/corest_v2.0.pro
> % IUK_MODEL 312
> /path/iuk_model_v2.2.pro
> % $MAIN$ 7
> /path/run_IUK.pro
> IDL>
> ################################################
>
> The line 136 in COREST: powell, xs, xi, .00001, err, 'struct_s'
>
> ################################################
>
> I have tried using other values for ITMAX (10000 for example) but I
> only obtain more arithmetic errors. I have used the /DOUBLE argument,
> but it doesn't solves the problem. As Powell is a built in function
> after the version 4.0 in IDL and I work with a very large amount of
> data, it is difficult to find the source of the problem.
> Any idea or advice?. I would thank any suggestion.
|
|
|