Ticket #130 (closed defect: worksforme)

Opened 6 years ago

Last modified 5 years ago

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.

Change History

comment:1 Changed 6 years ago by altafang

Here's a quick little test script for the peaks problem that demonstrates the issue:  http://ugcs.caltech.edu/~altafang/test_peaks.py

comment:2 Changed 6 years ago by mmckerns

  • Description modified (diff)

comment:3 Changed 6 years ago by mmckerns

  • Type changed from idea to defect

comment:4 Changed 6 years ago by mmckerns

  • Milestone changed from mystic-dev to mystic-0.2a2

comment:5 Changed 5 years ago by mmckerns

  • Status changed from new to closed
  • Resolution set to worksforme

in r484, edit VTR definition...

was: cost[-1] <= tol

now: abs( cost[-1] - target ) <= tol

comment:6 Changed 5 years ago by mmckerns

side effect is that for nonzero minima (actually anywhere the 'target' minima is wrong), the optimization will continue to run until maxiter/maxfun.

Note: See TracTickets for help on using tickets.