Lsqnonlin : the initial values don't vary and Genetic Algo is too slow (791 variables)

1 vue (au cours des 30 derniers jours)
Alicia
Alicia le 5 Août 2015
Commenté : Marylen Sun le 26 Nov 2020
Hello,
I am used to fminsearch (and fminsearchbnd provided by a User of this forum which works very well) but this time I need to minimize a function of 791 variables.
That's why I am trying the lsqnonlin. I have computed the function and not the Sum of the squared as the method requires it. The function is a sum from 1 to 39 so the function coded returns a column (39x1)
The issue is that lsqnonlin doesn't seem to make any variation from the initial values. I have tried other intial values and nothing changed.
[x,fval,exitflag,output]=lsqnonlin(@(x)ObjectiveStep5LSQ(x,SigmaS,k0,ZCcurve,gFunction,ag,bg,cg,dg,SwapLengths,Talpha,Tbeta,w,FwdIni,BetaS, ForwardSwapRate,delta_k),D,[],[],optimset('Display','iter-detailed','TolFun',10^-14,'TolX',10^-14,'MaxFunEvals',4000));
I have checked that the initial values are properly passed to the process and it is the case. Is there something I am missing ?
Additional information: In fact, it is a correlation matrix (39x39). Therefore I just need to calibrate the TriL without the diagonal as it has to be one. As initial guess I use exp(-b*abs(i-j)) with a given b. I couldn't put the boundaries conditions as each Function_k depends on 38 variables.
I have also tried the Genetic Algorithm (ga) and it seems to converge but it very very slow. I think it would take a week to complete (or not) the procedure.
Thank you for your help

Réponses (1)

Matt J
Matt J le 5 Août 2015
Modifié(e) : Matt J le 5 Août 2015
My guess is your objective function is piece-wise constant. Try making small changes mnaually to your initial guess and see if it changes the objective function value.
  4 commentaires
Alicia
Alicia le 5 Août 2015
Modifié(e) : Alicia le 5 Août 2015
Hi Alan,
Thank you for your help ! I have tried to set this option but unfortunately, Lsqnonlin is still very slow (I have also tried 1e-2 and 1e-1). The first step takes a very long time (still running). I show the value of the functions and it doesn't seem to change a lot. It looks like my objective function is very difficult to minimize ?
Thanks again
Marylen Sun
Marylen Sun le 26 Nov 2020
Hello, do you find a solution to your problem please?

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by