Ticket #130 (closed defect: worksforme)
VTR termination default
Reported by: | altafang | Owned by: | mmckerns |
---|---|---|---|
Priority: | minor | Milestone: | mystic-0.2a2 |
Component: | mystic.solvers | Keywords: | |
Cc: |
Description (last modified by mmckerns) (diff)
Using VTR's default tolerance (i.e. using VTR() without passing it any arguments) will not always work, since the default tolerance assumes the function value at the minimum is close to 0. In particular, this is a problem if the function value is negative at the minimum. To make the VTR termination work for such functions, one should pass the expected function value to VTR with the 'tol' keyword, or else use a different termination condition.
VTR is a termination condition that is used in diffev, the minimal interface for the Differential Evolution solvers, but I think that's a bad idea because its default is unreliable. Also, the documentation is misleading (it calls ftol the acceptable relative error, but it's not, if VTR is being used).
A test cost function where this is a problem is the 'peaks' function in http://dev.danse.us/trac/mystic/browser/branches/alta/mystic-0.2a1/test_problems_unconstrained.py , which has a negative function value at the minimum. If you set disp=True and run DifferentialEvolutionSolver, you'll notice that it only iterates once and then says the optimization terminated successfully.
Here's a quick little test script for the peaks problem that demonstrates the issue: http://ugcs.caltech.edu/~altafang/test_peaks.py