An issue about MultiStart with lsqcurvefit

1 次查看(过去 30 天)
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!