필터 지우기
필터 지우기

An issue about MultiStart with lsqcurvefit

조회 수: 1 (최근 30일)
HYOJAE LEE
HYOJAE LEE 2017년 10월 17일
댓글: Torsten 2017년 10월 18일
Hello there.
Im working on fitting my function to experimental data using lsqcurvefit and MultiStart in order to find out the global minimum values.
And I found out that x0, lb, ub and NumStartPoints affected to x values.
So here are my questions :
1. When I set ub 1e8 to 1e10, x values became 1e7 order to 1e9 order approximately. Why this phenomena occurred? And how do I set the feasible lb and ub?
2. I compared x values between using lsqcurvefit and lsqcurvefit+MultiStart. And I found out that order of x values are higher and near ub in case of lsqcurvefit+MultiStart. Could you explain how this result occurred?
3. Final question. When I control and set those conditions ( x0, lb, ub and NumStartPoints), x values were calculated in different values every times. As I working on my problems, how do I determined the feasible results?
myfun = @(x,xdata)(x(1).*x(2)*0.97.*x(4).*(xdata-2.2e-10)./(1+(x(2)*0.97).^0.5+x(3)*0.03+x(4).*xdata).^3)
xdata = [4.84037e-10;1.20314e-09;1.38743e-09;1.75941e-09;3.11749e-09;2.18567e-09;2.22319e-09;6.30723e-09;9.09648e-09;2.5766e-08;1.53398e-08;1.4891e-08;1.40325e-08;1.15354e-08;2.21674e-08;2.59195e-08] ; %16*1 double%
ydata = [0.1;0.2;0.3;0.4;0.5;0.6;0.7;0.8;0.9;1;1.1;1.2;1.3;1.4;1.5;1.6]; %16*1 double%
x0 = [10, 10, 10, 10] or [100, 100, 100, 100] or [1000, 1000, 1000, 1000] or [1e4, 1e4, 1e4, 1e4]
lb = [1e-8 1e-8 1e-8 1e-8];
ub = [1e8 1e8 1e8 1e8];
problem = createOptimProblem('lsqcurvefit','x0',x0,'objective',myfun,'lb',lb,'ub',ub,'xdata',xdata,'ydata',ydata);
ms = MultiStart('PlotFcns', @gsplotbestf);
[xmulti, errormulti] = run(ms, problem, 500) %NunStartPoints were set as 50, 500, 500 or rs=RandomStartPointSet('NumStartPoints',1000)%
Thank you for checking my questions.
  댓글 수: 5
HYOJAE LEE
HYOJAE LEE 2017년 10월 18일
Torsten
Thank you for your advice.
I just tried what you told but x(1) and x(2) couldnt determined because errormulti(Best Funtions Values) were about 15 and x values didnt change from x0.
In this time, x0 = [100, 100]
And I got same results using function as
x(3).*(xdata-2.2e-10)/(x(1)+x(2)*xdata)^3
fitting results were
[xmulti,errormulti] = run(ms,problem,5000)
MultiStart completed the runs from all start points.
All 5000 local solver runs converged with a positive local solver exit flag.
xmulti =
100 100
errormulti =
14.9600
What am I missing?
Torsten
Torsten 2017년 10월 18일
You can also work with the function
x(1)*(xdata-2.2e-10)/(1+x(2)*xdata)^3
Because your y-data are in the range 0.1 - 1.6, a starting guess with x(1)=1e8 and x(2)=0 might work.
Best wishes
Torsten.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 起動と終了에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!