new methode to initialize nm_simplex
Ivo Alxneit-Kamber
ivo.alxneit@psi.ch
Fri Mar 3 10:30:00 GMT 2006
On Thu, 2006-03-02 at 19:43 +0100, Brian Gough wrote:
> Ivo Alxneit-Kamber writes:
> > i had sometimes difficulties with this initializer because it results
> in
> > a "very regular" initial simplex. the first trial steps often only
> > change one parameter. (just as an example. i tried to optimize the
> > contour of a mirror defined by a spline interpolation of several
> points.
> > the current minimizer would start by trying to shift only individual
> > points. this, of course were not successful steps. it then contracted
> > for a long time until it finally took off correctly sometimes).
> >
> > so my proposal (see patch) is to change the call to
> > gsl_multimin_fminimizer_set() to use a starting vector and a single
> > value for the initial step size. nm_simplex_set() then contructs a
> > regular n-pod of size initial_step_size with the starting point at
> its
> > center. you can fine-tune the orientation of this initial simplex by
> > using different values for the environment variable
> GSL_NM_SIMPLEX_SEED.
>
> If you take the existing step_size vector, you could create a n-pod
> oriented in that direction with size |step_size| -- that would avoid
> any changes to the API, and allow it to be a new method (reusing most
> of the existing functions).
i fear you missunderstood (maybe my comments were not really sufficient)
or i do not really get your point here.
i think i better explain how the initialization is supposed to work with
an example for a two parameter case (2D case, the simplex is a
triangle). the current linitialization gives you a triangle with:
s0=(x0, y0) -> starting point, i.e. vector x (x0,y0)
s1=(x0 + a, y0) -> from start vector x
s2=(x0, y0 + b) and vector step_size (a,b)
so step_size defines
|s1-s0|=a and |s2-s0|=b i.e. the initial step size in the direction of
the two parameters. this allows that x_min and y_min are of largely
different magnitude and that the initial steps the algorithm takes
honor this by e.g. taking large steps in one direction and small ones in
the other.
now the new initialization i propose will give you an equilateral
triangle its center at (x0,y0) (none of the vertices is at the center)
that is randomly oriented as initial simplex. here i only request that
|s0|=|s1|=s2|=1 and (s0,s1)=(s0,s2)=(s1,s2)=constant.
because the triangle is randomly oriented you do not know how how to
scale the individaul vertices to force the algorithm to take large steps
in one and small steps in an other direction. so i think the
initialization only makes sense with an equilateral triangle.
\begin{parentheses}
i think it is also generally accepted good practice to scale the
function to be minimized in a way to ensure that all the parameters are
of the same magnitude. so defining individual stepsizes is not really
necessary.
if you think breaking the existing api is a-bad-thing-to-do i propose
the following:
- if all elements of the vector step_size are different from zero
the old (current) methode is used.
- if only the first element is different from zero the new (proposed)
method is used.
this way old code does not break.
\end{parentheses}
> To randomize the other orthogonal directions I'd suggest putting a
> simple RNG like 'vax' inside the method itself, so there aren't any
> dependencies on libgslrng.
>
would be using the standart c random number generator in stdlib.h
srandom(seed) to initialize and random() to pull a random number be also
ok?
thats fine with me. i will make the changes.
p.s. i will be off for skiing the next week, so do not expect
answers/comments/code right now.
--
Dr. Ivo Alxneit
Laboratory for Solar Technology phone: +41 56 310 4092
Paul Scherrer Institute fax: +41 56 310 2688
CH-5232 Villigen http://solar.web.psi.ch
Switzerland gnupg key: 0x515E30C7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20060303/d6a6e682/attachment.sig>
More information about the Gsl-discuss
mailing list