[SciPy-user] step size using optimize.fmin
Pauli Virtanen
pav at iki.fi
Sun Sep 14 07:34:18 EDT 2008
Sun, 14 Sep 2008 03:50:45 -0700, SimonPalmer wrote:
> Hi, I have a weird and lumpy N-D function that I am trying to minimize
> using optimize.fmin. The problem I am having is that the step size that
> fmin uses is fixed and not quite big enough to move the function value
> sufficiently far to examine a different "state", so the function
> terminates (cleanly) presuming it is on a flat surface.
Silly thought: maybe you could scale your function so that its
characteristic length scale becomes 1?
x_scale = 1000
f_scale = 1
def scaled_func(x):
return func(x * scale) * f_scale
xopt = sp.optimize.fmin(scaled_func, scale*x0)
xopt /= scale
--
Pauli Virtanen
More information about the SciPy-User
mailing list