Problem with GlobalSearch - Algorithm evaluates only initial point
Show older comments
Hi,
I'm trying to minimize the distance between two matrices using Globalsearch (Distance: A*Omega*A'-Sigma). Unfortunately, the algorithm doesn't seem to proceed, instead it evaluates the objective function at the same (initial) point at every run. Does anyone have an idea why that could be the case?
My optimization looks like this:
for i=1:numiter
disp(['Iteration No.',num2str(i),' in progress'])
SV;
problem = createOptimProblem('fmincon',...
'objective',@(SV) objectivefun(SV,S,N,cov_r1,cov_r2,cov_r3,cov_r4),...
'x0', SV,...
'options', optimset('MaxFunEval',inf,'MaxIter',Inf, 'LargeScale', 'off'));
gs = GlobalSearch('NumTrialPoints', 3000, 'Display', 'iter');
[estimator, fval]=run(gs,problem);
if fval<1e-002
disp('Converged!')
break
end
SV=estimator;
end
and my objective function is
function x = objectivefun(SV, S, N, cov_r1, cov_r2, cov_r3, cov_r4)
As = eye(N);
As(2:3,1) = SV(1:2,1); As(1,2) = SV(3,1); As(3,2) = SV(4,1); As(1:2,3) = SV(5:6,1);
As=kron(eye(S),As);
Sigmas = diag(SV(N*N-(N-1):end,1));
Omega = blkdiag(cov_r1, cov_r2, cov_r3, cov_r4);
x = sumabs(As*Omega*As'-Sigmas);
end
S and N are scalars, 4 and 3, respectively. cov_r1...cov_r4 are 3x3 Matrices. So that Omega, Sigma and A are all 12x12. It is supposed to optimize only over certain elements in A and the diagonal elements of Sigma - that is why I allocated the starting values to values in A and Sigma.
If someone has any idea what could be wrong, I'd greatly appreciate it.
Thanks a lot in advance. Regards!
Answers (0)
Categories
Find more on Surrogate Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!