This is the mail archive of the gsl-discuss@sourceware.cygnus.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: multidimensional optimization


Brian Gough wrote:
> 
> Polymorphism using "flags" is undesirable.  It would be best to
> provide a custom 1d-minimizer in the N-dimensional code to handle the
> case of minimization without an enclosing interval.
> 
> Alternatively, there is the strategy used in Numerical Recipes -- find
> an enclosing interval (by some method) first and feed it to an
> existing bracketing algorithm.
> 

Ok for not using individual flags, but maybe you misunderstood me. I need to
provide a way to find an enclosing interval, but this is not the problem. The
problem is useless reevaluation of the function values at bounding points of
the initial interval (and at the estimate minimum). If you think flags are a
bad idea, then I propose to add a boolean value to the set "method" of 1d-min
algo. When the value is true, we need to compute evaluate the function, and in
the other case, the function is assumed to be already computed. We will have
something like:
typedef struct
  {
    const gsl_min_fminimizer_type * type;
    gsl_function * function ;
    double minimum ;
    double f_minimum ;
    gsl_interval interval ;
    double f_lower;
    double f_upper;
    void *state;
  }
gsl_min_fminimizer;

Replace  int (*set) (void *state, gsl_function * f, double * minimum,
gsl_interval * x) by
int (*set) (void *state, gsl_function * f, double * minimum, gsl_interval *
x,unsigned char have_f);

The initial algorithm to find an enclosing interval is independant from the
bracketing algorithm and during my neural network experiments, I've found that
the enclosing interval finder is _very_ important and problem dependant. So I
want to keep it independant from the bracketing algorithm. Moreover, I don't
think it's a good idea to have a custom 1d-min algorithm in the Nd part.

Fabrice Rossi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]