필터 지우기
필터 지우기

Solution very sensitive to initial guess?

조회 수: 7 (최근 30일)
Soham
Soham 2015년 8월 11일
댓글: Soham 2015년 9월 4일
I am using fminunc and trying to minimize a sum of squared errors between experimental and model data in order to estimate the values of 4 parameters used in a differential equation. The differential equation is stiff and requires ODE23S. I notice that the minimized value and value of the 4 parameters that matlab gives as output is very sensitive to the initial guess values of the parameters that I input into fminunc. Also, (expectedly) MATLAB says the sum of squared errors it finds is a local minimum. So my question(s) are: a) What can I do so that regardless of what my initial guess of the parameters values are(of course, the guess should be within reason ), MATLAB gives the same minimized value and the same 4 parameter values. b) Can MATLAB find a global minimum for the sum of squared errors?
Thank you Soham

채택된 답변

Walter Roberson
Walter Roberson 2015년 8월 11일
fminunc is never a global minimizer (except, of course, when the only local minima is also the global minima.)
Have you experimented with fminsearch() ?
You should probably be using the Global Optimization toolbox for a global minimization.

추가 답변 (1개)

Alan Weiss
Alan Weiss 2015년 8월 17일
I am not sure that this will help, but I can suggest two things that have a chance of improving things for you:
  1. Use lsqnonlin, not fminunc. You will probably get faster, more reliable results. You will have to rewrite your objective function to give the vector of things that you square and sum for fminunc, because lsqnonneg wants that vector as the objective, not the sum of squares.
  2. Be careful and choose appropriate finite difference step sizes, as explained here.
And, as explained here, no Optimization Toolbox solver gives global solutions, only local, so you might have to take a variety of initial points to increase the likelihood that you arrive at the global minimum.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 1
Soham
Soham 2015년 9월 4일
Alan,
Thanks a lot and sorry for the late reply. Yes, I have started using lsqnonlin and it is giving faster/better results although not always (again dependent on initial conditions). I plan to use Multistart in order to study a number of points.

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

카테고리

Help CenterFile Exchange에서 Least Squares에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by