필터 지우기
필터 지우기

warning about optimset and using optimoptions

조회 수: 1 (최근 30일)
Snoopy
Snoopy 2017년 11월 20일
답변: Xuan Li 2018년 3월 23일
Hi, I use the fminunc function and the optimset as
options = optimset('GradObj','on','MaxFunEvals',1000,'MaxIter',1000,'Display','iter','TolFun',1e-100,'TolX',1e-100,'Algorithm','quasi-newton');
[B_hat_so,fval,exitflag,output,GradObj,hessian] = fminunc(@(B_true)exerciseeightpartonefunction(y,X,Z,B_true,W_hat,N_obs,N_par_X),B_ig,options);
I receive the following warning
Warning: Your current settings will run a different algorithm ('quasi-newton') in a future release. Either use optimoptions to set options (recommended), or set option Algorithm to 'trust-region' using optimset.
> In throwFminuncGradObjandLargeScaleWarning (line 18) In fminunc (line 170)
What is it that I can do to get rid of this warning? How should I change my code above? Thanks.

채택된 답변

Star Strider
Star Strider 2017년 11월 20일
Your best option is in the error message:
set option Algorithm to 'trust-region' using optimset.

추가 답변 (1개)

Xuan Li
Xuan Li 2018년 3월 23일
need to 'cd' to directory that you save costFunction()

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by