stephen.walton at csun.edu
Tue Nov 23 06:37:33 CST 2004
On Mon, 2004-11-22 at 20:57 +0100, Reik Börger wrote:
> Now, I additionally provide the gradient of the objective function and
> use optimize.fmin_bfgs. But when I run the program, the optimizer
> always stops after 2 or 3 iterations and returns a value close to my
> starting value as the optimal solution - doesn't matter, where I start,
> it is always very close to the starting value.
I am only asking this because I've made the same mistake myself many
times: how sure are you that your analytic gradient is correct? I
would write a test to compare the analytic gradient against a
numerically computed one before doing anything else.
Moreover, if the function you're optimizing is itself a Fortran or C
routine with a complicated or even non-analytic gradient, you might look
at the automatic differentiators out there:
Stephen Walton <stephen.walton at csun.edu>
Dept. of Physics & Astronomy, CSU Northridge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.scipy.net/pipermail/scipy-user/attachments/20041123/2b273752/attachment.bin
More information about the SciPy-user