[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Numerical Minimization in multidimensions without derivat
Re: [Help-gsl] Numerical Minimization in multidimensions without derivatives and constraints
Sun, 15 Nov 2015 08:54:17 +0100
The problematic region of the function is defined by the following part:
There is an Integral which you can't solve analytically. You need to do
approximations. Those approximations depends on the fraction m/T where m is
the Mass and a function depended on v1,v2,v3 and T is the Temperature which
is constant for a minimization.
You can then define 3 regions, where you can do relativly good
For low m/T you can approx it with a Term which has a m^2*T^2 - Term -m^3*T
- Term + m^4 - Term.
For mid-region m/T I calculated 10000 points numerically and do a linear
For high values of m/T the approximation is given by
The problem now is this m Term: You get it through a real, symmetric 4x4
Matrix which has 10 different terms which are all functions of v1,v2,v3 and
T. The 4 Eigenvalues of this matrix are 4 different m^2 which will be used
for the integrals. So if m^2<0 I have a problem as my Integral becomes
imaginary which is unphysical and must be discareded therefore.
I used your method to allow the completion of the fit with a bool variable
which will be set to false is m^2<0 and m^2 will be replaced by |m^2| and
this finally produces a repeatable result. Though I am not sure how "good"
this method is.
I will look into CMA-EAS and the paper for sure, thank you.
2015-11-12 3:23 GMT+01:00 Foivos Diakogiannis <
> Hi Philipp,
> few more details for the particular form of your function would help a
> lot. From your description it seems that your function can have multiple
> minima depending on some of the input parameters (not necessarily
> v1,...v3), hence the illegal solution, is this correct?
> There are several ways to treat constraints, and it is not always
> straightforward, because these may affect the quality of your solution see
> for example:
> Constraint-handling in nature-inspired numerical optimization: Past,
> present and future, Efrén Mezura-Montes, Carlos A. Coello Coello, 2011.
> One way is as Gilberto mentioned, return a value of the function which is
> large (compared to the minimum you are seeking). This, in some cases, may
> make your algorithm get stuck
> in suboptimal solutions (which may be very well good enough for your
> purposes), or for a very difficult fitness landscape, you may get an error
> (all of the proposed values of the minimizer are the same / "illegal"). A
> slightly better approach is for illegal values to return a very large value
> times a measure of "how illegal" is your solution (e.g. how far from zero
> is, e.g. somthing_large * norm_of_vector_of_illegal values ). In this way
> you allow for some exploration of parameter space close to the point of
> interest. Another approach is to allow the minimizer to complete the fit,
> and afterwards decided if you will keep or not the solution (remember, in
> the case of multiple minima, this method cannot give a unique solution, so
> you need another minimizer (mcmc / genetic algorithms / evolutionary
> optimization etc)). Another to tranform the (v1,v2,v3) --> (x1,x3,x3) where
> each of the tranformed values is a legal choice in box constraints.
> If you are searching for a numerical multivariate global minimization
> solver, try CMA-ES (it is not implemented in GSL, but it has a C-code, I am
> using libcmaes (C++ version) ). It would actually be a nice idea to have it
> in GSL, I don't know how fast would be to port the C code of Hansen in GSL
> Depending on the functional form you have this may, or may not, be the
> fastest choice.
> I hope the above helps, cheers
> On Wed, Nov 11, 2015 at 9:43 PM, Philipp Basler <
> address@hidden> wrote:
>> Hello to all,
>> I am using gsl_multimin_fminimizer_nmsimplex2 to minimize a function V (
>> v1,v2,v3) in those 3 variables v1,v2,v3. The function itself has a few
>> parameters but those are constant during an Minimizationsprocess.
>> Also I can not calculate any derivatives of this function.
>> Normally you could just use the nmsimplex2 method to minimize this but I
>> have a further constraint :
>> In the process of calculating V(v1,v2,v3) there are two 4x4 real and
>> symmetric Matrices from whom I need the Eigenvalues, those are calculated
>> numerically with the Eigen package. All entries of those both Matrices are
>> functions of v1,v2 and v3 and therefore the Eigenvalues are too.
>> Now my constraint: If any of those 8 Eigenvalues is negativ I need to
>> discard this combination of v1,v2,v3 and it is not allowed to enter my
>> search for a minimum.
>> Is there a way to do this?