Why does changing the initial x0 values in an optimization with fmincon not change the result?

4 views (last 30 days)
I built a ptoblem of optimizing a function (a trained neural network) to maximize it through fmincon; after the first results I tried changing the initial values to x0 but the result does not change at all, neither if I do it by hand nor if I use multistart. why?
xx=x(:,100); an array of 12 element
x0=[0.25; 0.25; 0.25; 0.25];
pp=xx(1:8);
A=[];
b=[];
Aeq=[1,1,1,1];
beq=1;
lb=[0;0;0;0];
ub=[1;1;1;1];
myfunct=@(pe)-net([pe;pp]);
problem=createOptimProblem('fmincon','lb',lb,'ub',ub,'Aineq',A, 'bineq',b,'Aeq',Aeq,'beq',beq,'x0',x0,'objective',myfunct);
ms=MultiStart(StartPointsToRun="bounds-ineqs");
[xsol,fval]=run(ms,problem,10)
  3 Comments

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!