Can GlobalSearch has different results, when it runs by stepwise-run and loop-run?
Show older comments
Hi,
Now I try to compare results using stepwise-run GlobalSearch function, loop-run GlobalSearch function and sum-square error minimization (SSE) to find a global min. Because my file needs large data files, I can not show. But I can describe it briefly like pseudocode.
And my environment is R2011a at Win7 32&64bit and I have ML, OPT tbx, Global OPT(GOPT) tbx, Sym math Tbx.
% SSE
>>x = linspace(0,1e2,1e6);
>>for i = 1 : length(x)
mytrialsse(i) = sum((experimentdatavector-modelfunction(x(i))).^2);
>>end
>>[Val Idx] = min(mytrialsse);
>>tau = x(Idx);
% GlobalSearch
>>load experimentaldatavector
>>mytrialsse = sum((experimentdatavector-modelfunction(x)).^2)
>>export mytrialsse to myobjfile1 by matlabFunction cmd with Symbolic Math Tbx
>>x0 = 0; lb = 0; ub = 150;
>>problem1 = createOptimProblem('fmincon', 'objective', @(x)myobjfile1(x),... 'x0',x0,'lb',lb, 'ub', ub);
>>gs = GlobalSearch('Display','final', 'NumTrialPoints', 1e4,'TolFun',1e-9,'TolX',1e-9);
>>[trialtau ~] = run(gs, problem1);
>>delete objective file
In this case, I already know global min as as solution by SSE. So when I compare a solution of stepwise-run(run by line) from GOPT Tbx, those results are similar. But when I make a for loop of GlobalSearch for other experimental data, the results are so different to those of SSE and stepwise-run.
Could anyone advise to me?
Answers (0)
Categories
Find more on Surrogate Optimization in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!