Ticket #133 (new enhancement)

Opened 6 years ago

Last modified 6 years ago

add a local copy of scipy.linesearch.line_search

Reported by: mmckerns Owned by: mmckerns
Priority: minor Milestone: mystic-0.4a
Component: mystic.solvers Keywords:
Cc:

Description (last modified by mmckerns) (diff)

fmin_cg and fmin_bfgs first try to use scipy.linesearch.line_search, which relies on scipy.optimize.minpack2 -- a shared library.

To obtain "identical" results to scipy's algorithm, can we use ctypes (or something else) to easily deliver the relevant parts of minpack2 without the need for c bindings.

Change History

comment:1 Changed 6 years ago by mmckerns

should pull function dependencies copied from scipy.optimize to the mystic algorithms to the copies in _scipy060optimize (see ticket #134)

for now, can provide a local copy of scipy.linesearch.line_search that does nothing but return alpha_k = None. If this happens, it will be taken as "failure" of the targeted line_search.

comment:2 Changed 6 years ago by mmckerns

in r419, isolated scipy.optimize.linesearch.line_search call to mystic.linesearch.line_search, as suggested above.

if scipy is available, we use scipy's linesearch.

comment:3 Changed 6 years ago by mmckerns

  • Description modified (diff)
  • Milestone changed from mystic-0.2a2 to mystic-0.2a3

With the try clause around the use of scipy.optimize, the user might get different results when scipy is installed versus if it is not. This is not optimal behavior... or at the very least, it should be much better documented.

comment:4 Changed 6 years ago by mmckerns

  • Description modified (diff)

comment:5 Changed 6 years ago by mmckerns

added comments to scipy_cg and scipy_bfgs to note that the algorithm likely performs better with scipy installed

Note: See TracTickets for help on using tickets.