[SciPy-dev] Advice on Simulated Annealing (ticket #875)

josef.pktd at gmail.com josef.pktd at gmail.com
Tue Mar 3 00:38:47 EST 2009


On Mon, Mar 2, 2009 at 2:15 PM, william ratcliff
<william.ratcliff at gmail.com> wrote:
> Perhaps we could enhance the documentation so this is clear?  Also, having
> another module which does impose bounds on the actual values of the
> parameters would be useful.  My ansatz was that if the next iteration would
> fall outside of the bounds, stay at the current location.
>
>
> Cheers,
> William

I checked again and neither anneal nor brute have any tests. Are there
any good or classical test cases for global optimization?

I only know the basic principles about simulated annealing, but
looking at the implementation in anneal, it seems to me that your
extension to impose bounds in update_guess should work, at least in
fast and simple (I didn't look carefully at the others.)
lower and upper bounds are also used in `getstart_temp`, which might
also need to be rewritten if the bounds of the increment are different
from the bounds on the underlying parameter.

As we discussed last week, new code needs to be accompanied by proper
tests. Especially, since no one has been really "maintaining" anneal
for a long time, that's the impression I get from the changelog,

>My ansatz was that if the next iteration would
> fall outside of the bounds, stay at the current location.

That's not my reading of the code, since, if xt is outside, then a new
increment candidate, xc, is drawn, which underlies the problem of the
ticket (looking for a very long time for a new candidate).
 But I still think a more efficient drawing from a rectangular area
inside the parameter bounds should be sufficient to make this work.


Josef



More information about the SciPy-Dev mailing list