Lower and Upper bounds in GlobalSearch
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Alan Weiss
am 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
Antworten (0)
Siehe auch
Kategorien
Mehr zu Global or Multiple Starting Point Search finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!