Lower and Upper bounds in GlobalSearch

1 vue (au cours des 30 derniers jours)
Snoopy
Snoopy le 5 Sep 2021
Commenté : Snoopy le 7 Sep 2021
I am maximizin a log-likelihood function in an empirical econometric research to estimate a mixed logit model. For this purpose I use GlobalSearch with which I try to find the estimate of a theta vector of parameters (coefficients in the nonlinear regression that maximizes the log-likelihood). For quite some time I used theta_ig as an inital guess vector without being aware of that I am able to specify lower and upper bounds to the estimate of the theta vector. My idea was to specify these bounds in case that this helps to cut the time of minimization. When I use the bounds, however, GlobalSearch do somethings I could not quite understand. When I run GlobalSearch without the bounds, it returns an estimated theta with the note "fmincon stopped because the size of the current step is less than the value of the step size tolerance and constraints are satisfied to within the value of the constraint tolerance." So this is fine. When I specify bounds, as in the code below, however, GlobalSearch (i) takes more time to return a minimizing theta vector, (ii) it does not return the same minimizing theta vector as when I do not use the bounds, and (iii) it says "all 38 local solver runs converged with a positive local solver exit flag" which I do not get when I do not use the bounds. Despite reading how GlobalSearch is searching for the minimum quite a bit, I cannot seem to figure out why these three things happen.
options = optimset('GradObj','off','MaxFunEvals',10000,'Display','on','DerivativeCheck','off','Algorithm','sqp','TolFun',1e-9,'TolX',1e-9,'Display','iter');
problem = createOptimProblem('fmincon','objective',obj,'x0',theta_ig,'lb',theta_lb,'ub',theta_ub,'options',options);
gs = GlobalSearch('Display','iter');
[theta_hat,fval,exitflag,output,solutions] = run(gs,problem);
  2 commentaires
Alan Weiss
Alan Weiss le 6 Sep 2021
You seem to specify both Display='on' and Display='iter'. What are you trying to achieve?
You set DerivativeCheck='off'. Why? What are you trying to achieve?
When you run with and without bounds you say that the solution changes. Do the bounds include the solution without bounds? Does the objective function improve or worsen when you include bounds?
You might want to look at the documentation to understand what GlobalSearch is doing.
Alan Weiss
MATLAB mathematical toolbox documentation
Snoopy
Snoopy le 7 Sep 2021
Thank you for the response. Display='on' is not necessary indeed. DerivateCheck='off' because I do not supply the objective function with a gradient so I cannot set it to 'on'. The solutions when bounds are used and not used are diferent. I could not understand what is mean by whether the bounds include the solution without bounds. How do I determine if the objective function improves or worsens when I include the bounds? I will take a look at the links.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Global or Multiple Starting Point Search dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by