Lower and Upper bounds in GlobalSearch

조회 수: 1 (최근 30일)
Snoopy
Snoopy 2021년 9월 5일
댓글: Snoopy 2021년 9월 7일
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
Alan Weiss
Alan Weiss 2021년 9월 6일
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 2021년 9월 7일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Global or Multiple Starting Point Search에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by